Package org.eigenbase.reltype

Examples of org.eigenbase.reltype.RelDataTypeField


  }

  @Override
  public SchemaPath visitInputRef(RexInputRef inputRef) {
    final int index = inputRef.getIndex();
    final RelDataTypeField field = inputRel.getRowType().getFieldList().get(index);
    if (partitionDescriptor.isPartitionName(field.getName())) {
      dirMatch = true;
    }
    return FieldReference.getWithQuotedRef(field.getName());
  }
View Full Code Here


    return super.visitCall(call);
  }

  private static int lookup(List<RelDataTypeField> fields, String name) {
    for (int i = 0; i < fields.size(); i++) {
      final RelDataTypeField field = fields.get(i);
      if (field.getName().equals(name)) {
        return i;
      }
    }
    return -1;
  }
View Full Code Here

    public SqlNode field(int ordinal) {
      for (Pair<String, RelDataType> alias : aliases) {
        final List<RelDataTypeField> fields = alias.right.getFieldList();
        if (ordinal < fields.size()) {
          RelDataTypeField field = fields.get(ordinal);
          return new SqlIdentifier(!qualified
              ? ImmutableList.of(field.getName())
              : ImmutableList.of(alias.left, field.getName()),
              POS);
        }
        ordinal -= fields.size();
      }
      throw new AssertionError(
View Full Code Here

        oldAggRel.getGroupSet(),
        newCalls);
  }

  private RelDataType getFieldType(RelNode relNode, int i) {
    final RelDataTypeField inputField =
        relNode.getRowType().getFieldList().get(i);
    return inputField.getType();
  }
View Full Code Here

    }

    @Override
    public LogicalExpression visitInputRef(RexInputRef inputRef) {
      final int index = inputRef.getIndex();
      final RelDataTypeField field = input.getRowType().getFieldList().get(index);
      return FieldReference.getWithQuotedRef(field.getName());
    }
View Full Code Here

    RelDataType inputRowType = child.getRowType();

    for( RexNode exp : fieldExps )
      {
      int index = ( (RexInputRef) exp ).getIndex();
      RelDataTypeField typeField = inputRowType.getFieldList().get( index );
      String name = typeField.getName();

      fields = fields.append( new Fields( name ) );
      }

    for( RelFieldCollation fieldCollation : collation.getFieldCollations() )
View Full Code Here

    {
    List<Fields> fields = new ArrayList<Fields>();

    for( Integer index : fieldList )
      {
      RelDataTypeField relDataTypeField = rowType.getFieldList().get( index );

      String fieldName = relDataTypeField.getName();
      Class fieldType = getJavaType( cluster, relDataTypeField.getType() );

      if( !numeric )
        fields.add( new Fields( fieldName, fieldType ) );
      else
        fields.add( new Fields( index, fieldType ) );
View Full Code Here

TOP

Related Classes of org.eigenbase.reltype.RelDataTypeField

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.