for(int i =0; i < keyExprs.length; i++){
// IMPORTANT: there is an implicit assertion here that the TypedFieldIds for the previous batch and the current batch are the same. This is possible because InternalBatch guarantees this.
logger.debug("Writing out expr {}", keyExprs[i]);
cg.rotateBlock();
cg.setMappingSet(RECORD_KEYS_PREV);
HoldingContainer innerExpression = cg.addExpr(keyExprs[i], false);
cg.setMappingSet(RECORD_KEYS_PREV_OUT);
HoldingContainer outerExpression = cg.addExpr(new ValueVectorWriteExpression(keyOutputIds[i], new HoldingContainerExpression(innerExpression), true), false);
cg.getBlock(BlockType.EVAL)._if(outerExpression.getValue().eq(JExpr.lit(0)))._then()._return(JExpr.FALSE);
}
cg.getBlock(BlockType.EVAL)._return(JExpr.TRUE);
}