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); }
aggregate.getRowType().getFieldList(); final List<RexInputRef> refs = new ArrayList<RexInputRef>(); final List<String> fieldNames = aggregate.getRowType().getFieldNames(); final BitSet groupSet = aggregate.getGroupSet(); for (int i : Util.toIter(groupSet)) {
distinctAgg.getRowType().getFieldList(); RexNode condition = rexBuilder.makeLiteral(true); for (i = 0; i < groupCount; ++i) {
aggRel.getRowType(), false);
newAggOutputProjExprList.add( rexBuilder.makeInputRef( newAggRel.getRowType().getFieldList().get(i).getType(), i));
aggRel.getRowType(), false);
new ArrayList<Pair<RexNode, String>>(); int source = 0; for (RelDataTypeField field : aggregate.getRowType().getFieldList()) { RexNode expr; final int i = field.getIndex();
final RelDataType rowType = aggregate.getRowType();
final RelDataType rowType = aggregate.getRowType();
new ArrayList<Pair<RexNode, String>>(); int source = 0; for (RelDataTypeField field : aggregate.getRowType().getFieldList()) { RexNode expr; final int i = field.getIndex();