Package org.eigenbase.rex

Examples of org.eigenbase.rex.RexInputRef


      this.map = map;
    }

    @Override
    public RexNode visitInputRef(RexInputRef inputRef) {
      return new RexInputRef(map.get(inputRef.getIndex()), inputRef.getType());
    }
View Full Code Here


      return new RexInputRef(map.get(inputRef.getIndex()), inputRef.getType());
    }

    @Override
    public RexNode visitLocalRef(RexLocalRef localRef) {
      return new RexInputRef(map.get(localRef.getIndex()), localRef.getType());
    }
View Full Code Here

     * 4. GBy
     */
    if (groupBy != null) {
      ASTBuilder b = ASTBuilder.construct(HiveParser.TOK_GROUPBY, "TOK_GROUPBY");
      for (int i : BitSets.toIter(groupBy.getGroupSet())) {
        RexInputRef iRef = new RexInputRef(i, groupBy.getCluster().getTypeFactory()
            .createSqlType(SqlTypeName.ANY));
        b.add(iRef.accept(new RexVisitor(schema)));
      }

      if (!groupBy.getGroupSet().isEmpty())
        hiveAST.groupBy = b.node();
      schema = new Schema(schema, groupBy);
View Full Code Here

        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)));
        }
        add(new ColumnInfo(null, b.node()));
      }
    }
View Full Code Here

        if (!newVCLst.isEmpty()) {
          List<RexNode> originalInputRefs = Lists.transform(srcRel.getRowType().getFieldList(),
              new Function<RelDataTypeField, RexNode>() {
                @Override
                public RexNode apply(RelDataTypeField input) {
                  return new RexInputRef(input.getIndex(), input.getType());
                }
              });
          RowResolver obSyntheticProjectRR = new RowResolver();
          if (!RowResolver.add(obSyntheticProjectRR, inputRR)) {
            throw new OptiqSemanticException(
View Full Code Here

      if (topConstrainingProjArgsRel != null) {
        List<RexNode> originalInputRefs = Lists.transform(topConstrainingProjArgsRel.getRowType()
            .getFieldList(), new Function<RelDataTypeField, RexNode>() {
          @Override
          public RexNode apply(RelDataTypeField input) {
            return new RexInputRef(input.getIndex(), input.getType());
          }
        });
        RowResolver topConstrainingProjRR = new RowResolver();
        if (!RowResolver.add(
            topConstrainingProjRR, this.relToHiveRR.get(topConstrainingProjArgsRel))) {
View Full Code Here

      this.map = map;
    }

    @Override
    public RexNode visitInputRef(RexInputRef inputRef) {
      return new RexInputRef(map.get(inputRef.getIndex()), inputRef.getType());
    }
View Full Code Here

      return new RexInputRef(map.get(inputRef.getIndex()), inputRef.getType());
    }

    @Override
    public RexNode visitLocalRef(RexLocalRef localRef) {
      return new RexInputRef(map.get(localRef.getIndex()), localRef.getType());
    }
View Full Code Here

TOP

Related Classes of org.eigenbase.rex.RexInputRef

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.