Package org.apache.parquet.format
Class SchemaElement
- java.lang.Object
-
- org.apache.parquet.format.SchemaElement
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<SchemaElement>
,org.apache.thrift.TBase<SchemaElement,SchemaElement._Fields>
,org.apache.thrift.TSerializable
@Generated(value="Autogenerated by Thrift Compiler (0.13.0)", date="2021-04-07") public class SchemaElement extends Object implements org.apache.thrift.TBase<SchemaElement,SchemaElement._Fields>, Serializable, Cloneable, Comparable<SchemaElement>
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SchemaElement._Fields
The set of fields this struct contains, along with convenience methods for finding and manipulating them.
-
Field Summary
Fields Modifier and Type Field Description ConvertedType
converted_type
DEPRECATED: When the schema is the result of a conversion from another model.int
field_id
When the original schema supports field ids, this will save the original field id in the parquet schemaLogicalType
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.static Map<SchemaElement._Fields,org.apache.thrift.meta_data.FieldMetaData>
metaDataMap
String
name
Name of the field in the schemaint
num_children
Nested fields.int
precision
FieldRepetitionType
repetition_type
repetition of the field.int
scale
DEPRECATED: Used when this column contains decimal data.Type
type
Data type for this field.int
type_length
If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the vales.
-
Constructor Summary
Constructors Constructor Description SchemaElement()
SchemaElement(String name)
SchemaElement(SchemaElement other)
Performs a deep copy on other.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
int
compareTo(SchemaElement other)
SchemaElement
deepCopy()
boolean
equals(Object that)
boolean
equals(SchemaElement that)
SchemaElement._Fields
fieldForId(int fieldId)
ConvertedType
getConverted_type()
DEPRECATED: When the schema is the result of a conversion from another model.int
getField_id()
When the original schema supports field ids, this will save the original field id in the parquet schemaObject
getFieldValue(SchemaElement._Fields field)
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.String
getName()
Name of the field in the schemaint
getNum_children()
Nested fields.int
getPrecision()
FieldRepetitionType
getRepetition_type()
repetition of the field.int
getScale()
DEPRECATED: Used when this column contains decimal data.Type
getType()
Data type for this field.int
getType_length()
If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the vales.int
hashCode()
boolean
isSet(SchemaElement._Fields field)
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwiseboolean
isSetConverted_type()
Returns true if field converted_type is set (has been assigned a value) and false otherwiseboolean
isSetField_id()
Returns true if field field_id is set (has been assigned a value) and false otherwiseboolean
isSetLogicalType()
Returns true if field logicalType is set (has been assigned a value) and false otherwiseboolean
isSetName()
Returns true if field name is set (has been assigned a value) and false otherwiseboolean
isSetNum_children()
Returns true if field num_children is set (has been assigned a value) and false otherwiseboolean
isSetPrecision()
Returns true if field precision is set (has been assigned a value) and false otherwiseboolean
isSetRepetition_type()
Returns true if field repetition_type is set (has been assigned a value) and false otherwiseboolean
isSetScale()
Returns true if field scale is set (has been assigned a value) and false otherwiseboolean
isSetType()
Returns true if field type is set (has been assigned a value) and false otherwiseboolean
isSetType_length()
Returns true if field type_length is set (has been assigned a value) and false otherwisevoid
read(org.apache.thrift.protocol.TProtocol iprot)
SchemaElement
setConverted_type(ConvertedType converted_type)
DEPRECATED: When the schema is the result of a conversion from another model.void
setConverted_typeIsSet(boolean value)
SchemaElement
setField_id(int field_id)
When the original schema supports field ids, this will save the original field id in the parquet schemavoid
setField_idIsSet(boolean value)
void
setFieldValue(SchemaElement._Fields field, Object value)
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.void
setLogicalTypeIsSet(boolean value)
SchemaElement
setName(String name)
Name of the field in the schemavoid
setNameIsSet(boolean value)
SchemaElement
setNum_children(int num_children)
Nested fields.void
setNum_childrenIsSet(boolean value)
SchemaElement
setPrecision(int precision)
void
setPrecisionIsSet(boolean value)
SchemaElement
setRepetition_type(FieldRepetitionType repetition_type)
repetition of the field.void
setRepetition_typeIsSet(boolean value)
SchemaElement
setScale(int scale)
DEPRECATED: Used when this column contains decimal data.void
setScaleIsSet(boolean value)
SchemaElement
setType(Type type)
Data type for this field.SchemaElement
setType_length(int type_length)
If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the vales.void
setType_lengthIsSet(boolean value)
void
setTypeIsSet(boolean value)
String
toString()
void
unsetConverted_type()
void
unsetField_id()
void
unsetLogicalType()
void
unsetName()
void
unsetNum_children()
void
unsetPrecision()
void
unsetRepetition_type()
void
unsetScale()
void
unsetType()
void
unsetType_length()
void
validate()
void
write(org.apache.thrift.protocol.TProtocol oprot)
-
-
-
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.
-
metaDataMap
public static final Map<SchemaElement._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
-
-
Constructor Detail
-
SchemaElement
public SchemaElement()
-
SchemaElement
public SchemaElement(String name)
-
SchemaElement
public SchemaElement(SchemaElement other)
Performs a deep copy on other.
-
-
Method Detail
-
deepCopy
public SchemaElement deepCopy()
- Specified by:
deepCopy
in interfaceorg.apache.thrift.TBase<SchemaElement,SchemaElement._Fields>
-
clear
public void clear()
- Specified by:
clear
in interfaceorg.apache.thrift.TBase<SchemaElement,SchemaElement._Fields>
-
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
-
setRepetition_type
public SchemaElement setRepetition_type(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
-
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
-
setName
public SchemaElement setName(String name)
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)
-
setFieldValue
public void setFieldValue(SchemaElement._Fields field, Object value)
- Specified by:
setFieldValue
in interfaceorg.apache.thrift.TBase<SchemaElement,SchemaElement._Fields>
-
getFieldValue
public Object getFieldValue(SchemaElement._Fields field)
- Specified by:
getFieldValue
in interfaceorg.apache.thrift.TBase<SchemaElement,SchemaElement._Fields>
-
isSet
public boolean isSet(SchemaElement._Fields field)
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise- Specified by:
isSet
in interfaceorg.apache.thrift.TBase<SchemaElement,SchemaElement._Fields>
-
equals
public boolean equals(SchemaElement that)
-
compareTo
public int compareTo(SchemaElement other)
- Specified by:
compareTo
in interfaceComparable<SchemaElement>
-
fieldForId
public SchemaElement._Fields fieldForId(int fieldId)
- Specified by:
fieldForId
in interfaceorg.apache.thrift.TBase<SchemaElement,SchemaElement._Fields>
-
read
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException
- Specified by:
read
in interfaceorg.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 interfaceorg.apache.thrift.TSerializable
- Throws:
org.apache.thrift.TException
-
validate
public void validate() throws org.apache.thrift.TException
- Throws:
org.apache.thrift.TException
-
-