if (origins.get(i) == i) { squished.put(i, newProjects.size()); newProjects.add(RexInputRef.of2(i, fields));
public Pair<RexNode, String> get(int index) { return RexInputRef.of2(index, fields); } };
public Pair<RexNode, String> get(int index) { return RexInputRef.of2(index, fields); } };
: childMapCorVarToOutputPos.keySet()) { int corVarPos = childMapCorVarToOutputPos.get(corVar); projects.add(RexInputRef.of2(corVarPos, newChildOutput)); mapCorVarToOutputPos.put(corVar, newPos); newPos++;
projects.add(RexInputRef.of2(corVarPos, newChildOutput)); mapCorVarToOutputPos.put(corVar, newPos); newPos++;
public void onMatch(RelOptRuleCall call) { CorrelatorRel corRel = call.rel(0); RelNode leftInputRel = call.rel(1); ProjectRel aggOutputProjRel; AggregateRel aggRel; if (flavor) { aggOutputProjRel = call.rel(2); aggRel = call.rel(3); } else { aggRel = call.rel(2); // Create identity projection List<Pair<RexNode, String>> projects = Lists.newArrayList(); final List<RelDataTypeField> fields = aggRel.getRowType().getFieldList(); for (int i = 0; i < fields.size(); i++) { projects.add(RexInputRef.of2(projects.size(), fields)); } aggOutputProjRel = (ProjectRel) CalcRel.createProject( aggRel, projects, false); } onMatch2(call, corRel, leftInputRel, aggOutputProjRel, aggRel); }
public void onMatch(RelOptRuleCall call) { CorrelatorRel corRel = call.rel(0); RelNode leftInputRel = call.rel(1); ProjectRel aggOutputProjRel; AggregateRel aggRel; if (flavor) { aggOutputProjRel = call.rel(2); aggRel = call.rel(3); } else { aggRel = call.rel(2); // Create identity projection List<Pair<RexNode, String>> projects = new ArrayList<Pair<RexNode, String>>(); final List<RelDataTypeField> fields = aggRel.getRowType().getFieldList(); for (int i = 0; i < fields.size(); i++) { projects.add(RexInputRef.of2(projects.size(), fields)); } aggOutputProjRel = (ProjectRel) CalcRel.createProject( aggRel, projects, false); } onMatch2(call, corRel, leftInputRel, aggOutputProjRel, aggRel); }
newProjects.add(RexInputRef.of2(i, leftInputFields));
newProjects.add(RexInputRef.of2(i, leftInputFields));
if (origins.get(i) == i) { squished.put(i, newProjects.size()); newProjects.add(RexInputRef.of2(i, fields));
if (origins.get(i) == i) { squished.put(i, newProjects.size()); newProjects.add(RexInputRef.of2(i, fields));
projects.add(RexInputRef.of2(newChildPos, newChildOutput)); mapNewChildToProjOutputPos.put(newChildPos, newPos); : childMapCorVarToOutputPos.keySet()) { int newChildPos = childMapCorVarToOutputPos.get(corVar); projects.add(RexInputRef.of2(newChildPos, newChildOutput)); for (int i = 0; i < newChildOutput.size(); i++) { if (!mapNewChildToProjOutputPos.containsKey(i)) { projects.add(RexInputRef.of2(i, newChildOutput)); mapNewChildToProjOutputPos.put(i, newPos); newPos++;
projects.add(RexInputRef.of2(newChildPos, newChildOutput)); mapNewChildToProjOutputPos.put(newChildPos, newPos); projects.add(RexInputRef.of2(newChildPos, newChildOutput)); for (int i = 0; i < newChildOutput.size(); i++) { if (!mapNewChildToProjOutputPos.containsKey(i)) { projects.add(RexInputRef.of2(i, newChildOutput)); mapNewChildToProjOutputPos.put(i, newPos); newPos++;
newProjExprs.add(RexInputRef.of2(i, leftInputFields));
newProjExprs.add(RexInputRef.of2(i, leftInputFields));