Record Class SchemaElement
java.lang.Object
java.lang.Record
dev.hardwood.metadata.SchemaElement
- Record Components:
name- column or group nametype- physical type of this element, ornullfor group nodestypeLength- fixed byte length forPhysicalType.FIXED_LEN_BYTE_ARRAYcolumns, ornullotherwiserepetitionType- repetition level (required, optional, or repeated)numChildren- number of child elements for group nodes, ornullfor primitive nodesconvertedType- legacy converted type annotation, ornullif absentscale- decimal scale (number of digits after the decimal point), ornullif not a decimalprecision- decimal precision (total number of digits), ornullif not a decimalfieldId- Thrift field id from the schema, ornullif absentlogicalType- logical type annotation, ornullif absent
public record SchemaElement(String name, PhysicalType type, Integer typeLength, RepetitionType repetitionType, Integer numChildren, ConvertedType convertedType, Integer scale, Integer precision, Integer fieldId, LogicalType logicalType)
extends Record
Schema element in Parquet file metadata.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSchemaElement(String name, PhysicalType type, Integer typeLength, RepetitionType repetitionType, Integer numChildren, ConvertedType convertedType, Integer scale, Integer precision, Integer fieldId, LogicalType logicalType) Creates an instance of aSchemaElementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconvertedTyperecord component.final booleanIndicates whether some other object is "equal to" this one.fieldId()Returns the value of thefieldIdrecord component.final inthashCode()Returns a hash code value for this object.booleanisGroup()Returnstrueif this element is a group node (has no physical type).booleanReturnstrueif this element is a primitive node (has a physical type).Returns the value of thelogicalTyperecord component.name()Returns the value of thenamerecord component.Returns the value of thenumChildrenrecord component.Returns the value of theprecisionrecord component.Returns the value of therepetitionTyperecord component.scale()Returns the value of thescalerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.Returns the value of thetypeLengthrecord component.
-
Constructor Details
-
SchemaElement
public SchemaElement(String name, PhysicalType type, Integer typeLength, RepetitionType repetitionType, Integer numChildren, ConvertedType convertedType, Integer scale, Integer precision, Integer fieldId, LogicalType logicalType) Creates an instance of aSchemaElementrecord class.- Parameters:
name- the value for thenamerecord componenttype- the value for thetyperecord componenttypeLength- the value for thetypeLengthrecord componentrepetitionType- the value for therepetitionTyperecord componentnumChildren- the value for thenumChildrenrecord componentconvertedType- the value for theconvertedTyperecord componentscale- the value for thescalerecord componentprecision- the value for theprecisionrecord componentfieldId- the value for thefieldIdrecord componentlogicalType- the value for thelogicalTyperecord component
-
-
Method Details
-
isGroup
public boolean isGroup()Returnstrueif this element is a group node (has no physical type). -
isPrimitive
public boolean isPrimitive()Returnstrueif this element is a primitive node (has a physical type). -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
name
-
type
-
typeLength
Returns the value of thetypeLengthrecord component.- Returns:
- the value of the
typeLengthrecord component
-
repetitionType
Returns the value of therepetitionTyperecord component.- Returns:
- the value of the
repetitionTyperecord component
-
numChildren
Returns the value of thenumChildrenrecord component.- Returns:
- the value of the
numChildrenrecord component
-
convertedType
Returns the value of theconvertedTyperecord component.- Returns:
- the value of the
convertedTyperecord component
-
scale
-
precision
-
fieldId
-
logicalType
Returns the value of thelogicalTyperecord component.- Returns:
- the value of the
logicalTyperecord component
-