Class SchemaElement

    • Field Detail

      • type

        public Type type
        Data type for this field. Not set if the current element is a non-leaf node
        See Also:
        Type
      • type_length

        public int type_length
        If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the vales. Otherwise, if specified, this is the maximum bit length to store any of the values. (e.g. a low cardinality INT col could have this set to 3). Note that this is in the schema, and therefore fixed for the entire file.
      • repetition_type

        public FieldRepetitionType repetition_type
        repetition of the field. The root of the schema does not have a repetition_type. All other nodes must have one
        See Also:
        FieldRepetitionType
      • name

        public String name
        Name of the field in the schema
      • num_children

        public int num_children
        Nested fields. Since thrift does not support nested fields, the nesting is flattened to a single list by a depth-first traversal. The children count is used to construct the nested relationship. This field is not set when the element is a primitive type
      • converted_type

        public ConvertedType converted_type
        DEPRECATED: When the schema is the result of a conversion from another model. Used to record the original type to help with cross conversion. This is superseded by logicalType.
        See Also:
        ConvertedType
      • scale

        public int scale
        DEPRECATED: Used when this column contains decimal data. See the DECIMAL converted type for more details. This is superseded by using the DecimalType annotation in logicalType.
      • precision

        public int precision
      • field_id

        public int field_id
        When the original schema supports field ids, this will save the original field id in the parquet schema
      • logicalType

        public LogicalType logicalType
        The logical type of this SchemaElement LogicalType replaces ConvertedType, but ConvertedType is still required for some logical types to ensure forward-compatibility in format v1.
    • Constructor Detail

      • SchemaElement

        public SchemaElement()
      • SchemaElement

        public SchemaElement​(String name)
      • SchemaElement

        public SchemaElement​(SchemaElement other)
        Performs a deep copy on other.
    • Method Detail

      • getType

        public Type getType()
        Data type for this field. Not set if the current element is a non-leaf node
        See Also:
        Type
      • setType

        public SchemaElement setType​(Type type)
        Data type for this field. Not set if the current element is a non-leaf node
        See Also:
        Type
      • unsetType

        public void unsetType()
      • isSetType

        public boolean isSetType()
        Returns true if field type is set (has been assigned a value) and false otherwise
      • setTypeIsSet

        public void setTypeIsSet​(boolean value)
      • getType_length

        public int getType_length()
        If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the vales. Otherwise, if specified, this is the maximum bit length to store any of the values. (e.g. a low cardinality INT col could have this set to 3). Note that this is in the schema, and therefore fixed for the entire file.
      • setType_length

        public SchemaElement setType_length​(int type_length)
        If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the vales. Otherwise, if specified, this is the maximum bit length to store any of the values. (e.g. a low cardinality INT col could have this set to 3). Note that this is in the schema, and therefore fixed for the entire file.
      • unsetType_length

        public void unsetType_length()
      • isSetType_length

        public boolean isSetType_length()
        Returns true if field type_length is set (has been assigned a value) and false otherwise
      • setType_lengthIsSet

        public void setType_lengthIsSet​(boolean value)
      • getRepetition_type

        public FieldRepetitionType getRepetition_type()
        repetition of the field. The root of the schema does not have a repetition_type. All other nodes must have one
        See Also:
        FieldRepetitionType
      • unsetRepetition_type

        public void unsetRepetition_type()
      • isSetRepetition_type

        public boolean isSetRepetition_type()
        Returns true if field repetition_type is set (has been assigned a value) and false otherwise
      • setRepetition_typeIsSet

        public void setRepetition_typeIsSet​(boolean value)
      • getName

        public String getName()
        Name of the field in the schema
      • unsetName

        public void unsetName()
      • isSetName

        public boolean isSetName()
        Returns true if field name is set (has been assigned a value) and false otherwise
      • setNameIsSet

        public void setNameIsSet​(boolean value)
      • getNum_children

        public int getNum_children()
        Nested fields. Since thrift does not support nested fields, the nesting is flattened to a single list by a depth-first traversal. The children count is used to construct the nested relationship. This field is not set when the element is a primitive type
      • setNum_children

        public SchemaElement setNum_children​(int num_children)
        Nested fields. Since thrift does not support nested fields, the nesting is flattened to a single list by a depth-first traversal. The children count is used to construct the nested relationship. This field is not set when the element is a primitive type
      • unsetNum_children

        public void unsetNum_children()
      • isSetNum_children

        public boolean isSetNum_children()
        Returns true if field num_children is set (has been assigned a value) and false otherwise
      • setNum_childrenIsSet

        public void setNum_childrenIsSet​(boolean value)
      • getConverted_type

        public ConvertedType getConverted_type()
        DEPRECATED: When the schema is the result of a conversion from another model. Used to record the original type to help with cross conversion. This is superseded by logicalType.
        See Also:
        ConvertedType
      • setConverted_type

        public SchemaElement setConverted_type​(ConvertedType converted_type)
        DEPRECATED: When the schema is the result of a conversion from another model. Used to record the original type to help with cross conversion. This is superseded by logicalType.
        See Also:
        ConvertedType
      • unsetConverted_type

        public void unsetConverted_type()
      • isSetConverted_type

        public boolean isSetConverted_type()
        Returns true if field converted_type is set (has been assigned a value) and false otherwise
      • setConverted_typeIsSet

        public void setConverted_typeIsSet​(boolean value)
      • getScale

        public int getScale()
        DEPRECATED: Used when this column contains decimal data. See the DECIMAL converted type for more details. This is superseded by using the DecimalType annotation in logicalType.
      • setScale

        public SchemaElement setScale​(int scale)
        DEPRECATED: Used when this column contains decimal data. See the DECIMAL converted type for more details. This is superseded by using the DecimalType annotation in logicalType.
      • unsetScale

        public void unsetScale()
      • isSetScale

        public boolean isSetScale()
        Returns true if field scale is set (has been assigned a value) and false otherwise
      • setScaleIsSet

        public void setScaleIsSet​(boolean value)
      • getPrecision

        public int getPrecision()
      • setPrecision

        public SchemaElement setPrecision​(int precision)
      • unsetPrecision

        public void unsetPrecision()
      • isSetPrecision

        public boolean isSetPrecision()
        Returns true if field precision is set (has been assigned a value) and false otherwise
      • setPrecisionIsSet

        public void setPrecisionIsSet​(boolean value)
      • getField_id

        public int getField_id()
        When the original schema supports field ids, this will save the original field id in the parquet schema
      • setField_id

        public SchemaElement setField_id​(int field_id)
        When the original schema supports field ids, this will save the original field id in the parquet schema
      • unsetField_id

        public void unsetField_id()
      • isSetField_id

        public boolean isSetField_id()
        Returns true if field field_id is set (has been assigned a value) and false otherwise
      • setField_idIsSet

        public void setField_idIsSet​(boolean value)
      • getLogicalType

        public LogicalType getLogicalType()
        The logical type of this SchemaElement LogicalType replaces ConvertedType, but ConvertedType is still required for some logical types to ensure forward-compatibility in format v1.
      • setLogicalType

        public SchemaElement setLogicalType​(LogicalType logicalType)
        The logical type of this SchemaElement LogicalType replaces ConvertedType, but ConvertedType is still required for some logical types to ensure forward-compatibility in format v1.
      • unsetLogicalType

        public void unsetLogicalType()
      • isSetLogicalType

        public boolean isSetLogicalType()
        Returns true if field logicalType is set (has been assigned a value) and false otherwise
      • setLogicalTypeIsSet

        public void setLogicalTypeIsSet​(boolean value)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • read

        public void read​(org.apache.thrift.protocol.TProtocol iprot)
                  throws org.apache.thrift.TException
        Specified by:
        read in interface org.apache.thrift.TSerializable
        Throws:
        org.apache.thrift.TException
      • write

        public void write​(org.apache.thrift.protocol.TProtocol oprot)
                   throws org.apache.thrift.TException
        Specified by:
        write in interface org.apache.thrift.TSerializable
        Throws:
        org.apache.thrift.TException
      • validate

        public void validate()
                      throws org.apache.thrift.TException
        Throws:
        org.apache.thrift.TException