// Generate the code to project build side records
g.setMappingSet(projectBuildMapping);
int fieldId = 0;
JExpression buildIndex = JExpr.direct("buildIndex");
JExpression outIndex = JExpr.direct("outIndex");
g.rotateBlock();
if (hyperContainer != null) {
for(VectorWrapper<?> vv : hyperContainer) {
MajorType inputType = vv.getField().getType();
MajorType outputType;
if (joinType == JoinRelType.LEFT && inputType.getMode() == DataMode.REQUIRED) {
outputType = Types.overrideMode(inputType, DataMode.OPTIONAL);
} else {
outputType = inputType;
}
// Add the vector to our output container
ValueVector v = TypeHelper.getNewVector(MaterializedField.create(vv.getField().getPath(), outputType), context.getAllocator());
container.add(v);
JVar inVV = g.declareVectorValueSetupAndMember("buildBatch", new TypedFieldId(vv.getField().getType(), true, fieldId));
JVar outVV = g.declareVectorValueSetupAndMember("outgoing", new TypedFieldId(outputType, false, fieldId));
g.getEvalBlock()._if(outVV.invoke("copyFromSafe")
.arg(buildIndex.band(JExpr.lit((int) Character.MAX_VALUE)))
.arg(outIndex)
.arg(inVV.component(buildIndex.shrz(JExpr.lit(16)))).not())._then()._return(JExpr.FALSE);
fieldId++;
}
}
g.rotateBlock();
g.getEvalBlock()._return(JExpr.TRUE);
// Generate the code to project probe side records
g.setMappingSet(projectProbeMapping);
int outputFieldId = fieldId;
fieldId = 0;
JExpression probeIndex = JExpr.direct("probeIndex");
int recordCount = 0;
if (leftUpstream == IterOutcome.OK || leftUpstream == IterOutcome.OK_NEW_SCHEMA) {
for (VectorWrapper<?> vv : left) {