Record Class ColumnSchema
java.lang.Object
java.lang.Record
dev.hardwood.schema.ColumnSchema
- Record Components:
fieldPath- path from the schema root to this leaf column (unambiguous across schemas with duplicate leaf names)type- physical (storage) type of the columnrepetitionType- whether the column is required, optional, or repeatedtypeLength- fixed byte length forPhysicalType.FIXED_LEN_BYTE_ARRAYcolumns, ornullotherwisecolumnIndex- zero-based index of this column among all leaf columns in the schemamaxDefinitionLevel- maximum definition level, computed from the schema hierarchymaxRepetitionLevel- maximum repetition level, computed from the schema hierarchylogicalType- logical type annotation, ornullif absent
public record ColumnSchema(FieldPath fieldPath, PhysicalType type, RepetitionType repetitionType, Integer typeLength, int columnIndex, int maxDefinitionLevel, int maxRepetitionLevel, LogicalType logicalType)
extends Record
Represents a primitive column in a Parquet schema. Stores computed definition
and repetition levels based on schema hierarchy.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionColumnSchema(FieldPath fieldPath, PhysicalType type, RepetitionType repetitionType, Integer typeLength, int columnIndex, int maxDefinitionLevel, int maxRepetitionLevel, LogicalType logicalType) Creates an instance of aColumnSchemarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecolumnIndexrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefieldPathrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thelogicalTyperecord component.intReturns the value of themaxDefinitionLevelrecord component.intReturns the value of themaxRepetitionLevelrecord component.name()Returns the leaf (last) element of the field path, i.e. the column name.Returns the value of therepetitionTyperecord component.toString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.Returns the value of thetypeLengthrecord component.
-
Constructor Details
-
ColumnSchema
public ColumnSchema(FieldPath fieldPath, PhysicalType type, RepetitionType repetitionType, Integer typeLength, int columnIndex, int maxDefinitionLevel, int maxRepetitionLevel, LogicalType logicalType) Creates an instance of aColumnSchemarecord class.- Parameters:
fieldPath- the value for thefieldPathrecord componenttype- the value for thetyperecord componentrepetitionType- the value for therepetitionTyperecord componenttypeLength- the value for thetypeLengthrecord componentcolumnIndex- the value for thecolumnIndexrecord componentmaxDefinitionLevel- the value for themaxDefinitionLevelrecord componentmaxRepetitionLevel- the value for themaxRepetitionLevelrecord componentlogicalType- the value for thelogicalTyperecord component
-
-
Method Details
-
name
Returns the leaf (last) element of the field path, i.e. the column name. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
fieldPath
-
type
-
repetitionType
Returns the value of therepetitionTyperecord component.- Returns:
- the value of the
repetitionTyperecord component
-
typeLength
Returns the value of thetypeLengthrecord component.- Returns:
- the value of the
typeLengthrecord component
-
columnIndex
public int columnIndex()Returns the value of thecolumnIndexrecord component.- Returns:
- the value of the
columnIndexrecord component
-
maxDefinitionLevel
public int maxDefinitionLevel()Returns the value of themaxDefinitionLevelrecord component.- Returns:
- the value of the
maxDefinitionLevelrecord component
-
maxRepetitionLevel
public int maxRepetitionLevel()Returns the value of themaxRepetitionLevelrecord component.- Returns:
- the value of the
maxRepetitionLevelrecord component
-
logicalType
Returns the value of thelogicalTyperecord component.- Returns:
- the value of the
logicalTyperecord component
-