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.16.0)", date="2023-05-12") 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 classSchemaElement._FieldsThe set of fields this struct contains, along with convenience methods for finding and manipulating them.
-
Field Summary
Fields Modifier and Type Field Description ConvertedTypeconverted_typeDEPRECATED: When the schema is the result of a conversion from another model.intfield_idWhen the original schema supports field ids, this will save the original field id in the parquet schemaLogicalTypelogicalTypeThe 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>metaDataMapStringnameName of the field in the schemaintnum_childrenNested fields.intprecisionFieldRepetitionTyperepetition_typerepetition of the field.intscaleDEPRECATED: Used when this column contains decimal data.TypetypeData type for this field.inttype_lengthIf 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 voidclear()intcompareTo(SchemaElement other)SchemaElementdeepCopy()booleanequals(Object that)booleanequals(SchemaElement that)SchemaElement._FieldsfieldForId(int fieldId)ConvertedTypegetConverted_type()DEPRECATED: When the schema is the result of a conversion from another model.intgetField_id()When the original schema supports field ids, this will save the original field id in the parquet schemaObjectgetFieldValue(SchemaElement._Fields field)LogicalTypegetLogicalType()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.StringgetName()Name of the field in the schemaintgetNum_children()Nested fields.intgetPrecision()FieldRepetitionTypegetRepetition_type()repetition of the field.intgetScale()DEPRECATED: Used when this column contains decimal data.TypegetType()Data type for this field.intgetType_length()If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the vales.inthashCode()booleanisSet(SchemaElement._Fields field)Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwisebooleanisSetConverted_type()Returns true if field converted_type is set (has been assigned a value) and false otherwisebooleanisSetField_id()Returns true if field field_id is set (has been assigned a value) and false otherwisebooleanisSetLogicalType()Returns true if field logicalType is set (has been assigned a value) and false otherwisebooleanisSetName()Returns true if field name is set (has been assigned a value) and false otherwisebooleanisSetNum_children()Returns true if field num_children is set (has been assigned a value) and false otherwisebooleanisSetPrecision()Returns true if field precision is set (has been assigned a value) and false otherwisebooleanisSetRepetition_type()Returns true if field repetition_type is set (has been assigned a value) and false otherwisebooleanisSetScale()Returns true if field scale is set (has been assigned a value) and false otherwisebooleanisSetType()Returns true if field type is set (has been assigned a value) and false otherwisebooleanisSetType_length()Returns true if field type_length is set (has been assigned a value) and false otherwisevoidread(org.apache.thrift.protocol.TProtocol iprot)SchemaElementsetConverted_type(ConvertedType converted_type)DEPRECATED: When the schema is the result of a conversion from another model.voidsetConverted_typeIsSet(boolean value)SchemaElementsetField_id(int field_id)When the original schema supports field ids, this will save the original field id in the parquet schemavoidsetField_idIsSet(boolean value)voidsetFieldValue(SchemaElement._Fields field, Object value)SchemaElementsetLogicalType(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.voidsetLogicalTypeIsSet(boolean value)SchemaElementsetName(String name)Name of the field in the schemavoidsetNameIsSet(boolean value)SchemaElementsetNum_children(int num_children)Nested fields.voidsetNum_childrenIsSet(boolean value)SchemaElementsetPrecision(int precision)voidsetPrecisionIsSet(boolean value)SchemaElementsetRepetition_type(FieldRepetitionType repetition_type)repetition of the field.voidsetRepetition_typeIsSet(boolean value)SchemaElementsetScale(int scale)DEPRECATED: Used when this column contains decimal data.voidsetScaleIsSet(boolean value)SchemaElementsetType(Type type)Data type for this field.SchemaElementsetType_length(int type_length)If type is FIXED_LEN_BYTE_ARRAY, this is the byte length of the vales.voidsetType_lengthIsSet(boolean value)voidsetTypeIsSet(boolean value)StringtoString()voidunsetConverted_type()voidunsetField_id()voidunsetLogicalType()voidunsetName()voidunsetNum_children()voidunsetPrecision()voidunsetRepetition_type()voidunsetScale()voidunsetType()voidunsetType_length()voidvalidate()voidwrite(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:
deepCopyin interfaceorg.apache.thrift.TBase<SchemaElement,SchemaElement._Fields>
-
clear
public void clear()
- Specified by:
clearin 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:
setFieldValuein interfaceorg.apache.thrift.TBase<SchemaElement,SchemaElement._Fields>
-
getFieldValue
public Object getFieldValue(SchemaElement._Fields field)
- Specified by:
getFieldValuein 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:
isSetin interfaceorg.apache.thrift.TBase<SchemaElement,SchemaElement._Fields>
-
equals
public boolean equals(SchemaElement that)
-
compareTo
public int compareTo(SchemaElement other)
- Specified by:
compareToin interfaceComparable<SchemaElement>
-
fieldForId
public SchemaElement._Fields fieldForId(int fieldId)
- Specified by:
fieldForIdin interfaceorg.apache.thrift.TBase<SchemaElement,SchemaElement._Fields>
-
read
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException- Specified by:
readin 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:
writein interfaceorg.apache.thrift.TSerializable- Throws:
org.apache.thrift.TException
-
validate
public void validate() throws org.apache.thrift.TException- Throws:
org.apache.thrift.TException
-
-