RexInputRef iRef = new RexInputRef(i, aggInputRel.getRowType().getFieldList() .get(i).getType()); tmpExprNodeDesc = iRef.accept(exprConv); gbInfo.gbKeys.add(tmpExprNodeDesc); gbInfo.gbKeyColNamesInInput.add(aggInputRel.getRowType().getFieldNames().get(i));
RexInputRef iRef = new RexInputRef(i, aggInputRel.getRowType().getFieldList() .get(i).getType()); tmpExprNodeDesc = iRef.accept(exprConv); gbInfo.gbKeys.add(tmpExprNodeDesc); gbInfo.gbKeyColNamesInInput.add(aggInputRel.getRowType().getFieldNames().get(i));
Schema(Schema src, Aggregate gBy) { for (int i : gBy.getGroupSet()) { ColumnInfo cI = src.get(i); add(cI); } List<AggregateCall> aggs = gBy.getAggCallList(); for (AggregateCall agg : aggs) { if (agg.getAggregation() == HiveGroupingID.INSTANCE) { add(new ColumnInfo(null,VirtualColumn.GROUPINGID.getName())); continue; } int argCount = agg.getArgList().size(); ASTBuilder b = agg.isDistinct() ? ASTBuilder.construct(HiveParser.TOK_FUNCTIONDI, "TOK_FUNCTIONDI") : argCount == 0 ? ASTBuilder.construct(HiveParser.TOK_FUNCTIONSTAR, "TOK_FUNCTIONSTAR") : ASTBuilder.construct(HiveParser.TOK_FUNCTION, "TOK_FUNCTION"); b.add(HiveParser.Identifier, agg.getAggregation().getName()); for (int i : agg.getArgList()) { RexInputRef iRef = new RexInputRef(i, gBy.getCluster().getTypeFactory() .createSqlType(SqlTypeName.ANY)); b.add(iRef.accept(new RexVisitor(src, false, gBy.getCluster().getRexBuilder()))); } add(new ColumnInfo(null, b.node())); } }
RexInputRef iRef = new RexInputRef(i, gBy.getCluster().getTypeFactory() .createSqlType(SqlTypeName.ANY)); b.add(iRef.accept(new RexVisitor(src)));
RexInputRef iRef = new RexInputRef(groupBy.getGroupSet().nth(pos), groupBy.getCluster().getTypeFactory().createSqlType(SqlTypeName.ANY)); b.add(iRef.accept(new RexVisitor(schema, false, root.getCluster().getRexBuilder()))); RexInputRef iRef = new RexInputRef(groupBy.getGroupSet().nth(pos), groupBy.getCluster().getTypeFactory().createSqlType(SqlTypeName.ANY)); b.add(iRef.accept(new RexVisitor(schema, false, root.getCluster().getRexBuilder()))); RexInputRef iRef = new RexInputRef(i, groupBy.getCluster().getTypeFactory() .createSqlType(SqlTypeName.ANY)); expression.add(iRef.accept(new RexVisitor(schema, false, root.getCluster().getRexBuilder())));
RexInputRef iRef = new RexInputRef(groupBy.getGroupSet().nth(pos), groupBy.getCluster().getTypeFactory().createSqlType(SqlTypeName.ANY)); b.add(iRef.accept(new RexVisitor(schema))); RexInputRef iRef = new RexInputRef(groupBy.getGroupSet().nth(pos), groupBy.getCluster().getTypeFactory().createSqlType(SqlTypeName.ANY)); b.add(iRef.accept(new RexVisitor(schema))); RexInputRef iRef = new RexInputRef(i, groupBy.getCluster().getTypeFactory() .createSqlType(SqlTypeName.ANY)); expression.add(iRef.accept(new RexVisitor(schema)));
RexInputRef iRef = new RexInputRef(i, aggInputRel.getRowType().getFieldList() .get(i).getType()); tmpExprNodeDesc = iRef.accept(exprConv); gbInfo.gbKeys.add(tmpExprNodeDesc); gbInfo.gbKeyColNamesInInput.add(aggInputRel.getRowType().getFieldNames().get(i));
RexInputRef iRef = new RexInputRef(i, gBy.getCluster().getTypeFactory() .createSqlType(SqlTypeName.ANY)); b.add(iRef.accept(new RexVisitor(src)));
RexInputRef iRef = new RexInputRef(i, groupBy.getCluster().getTypeFactory() .createSqlType(SqlTypeName.ANY)); b.add(iRef.accept(new RexVisitor(schema))); RexInputRef iRef = new RexInputRef(i, groupBy.getCluster().getTypeFactory() .createSqlType(SqlTypeName.ANY)); expression.add(iRef.accept(new RexVisitor(schema)));