Record Class SchemaNode.PrimitiveNode
java.lang.Object
java.lang.Record
dev.hardwood.schema.SchemaNode.PrimitiveNode
- Record Components:
column- the leaf's column
- All Implemented Interfaces:
SchemaNode
- Enclosing interface:
SchemaNode
public static record SchemaNode.PrimitiveNode(ColumnSchema column)
extends Record
implements SchemaNode
Primitive leaf node representing an actual data column.
The node holds the leaf's entry in the flat column list, FileSchema.getColumns(), and
reads each of its attributes from that entry.
-
Nested Class Summary
Nested classes/interfaces inherited from interface SchemaNode
SchemaNode.GroupNode, SchemaNode.PrimitiveNode -
Constructor Summary
ConstructorsConstructorDescriptionPrimitiveNode(ColumnSchema column) Creates an instance of aPrimitiveNoderecord class. -
Method Summary
Modifier and TypeMethodDescriptioncolumn()Returns the value of thecolumnrecord component.intReturns the zero-based index among all leaf columns.final booleanIndicates whether some other object is "equal to" this one.fieldId()Returns the field id of the schema element (field_idinparquet.thrift), ornullif the element has no field id.final inthashCode()Returns a hash code value for this object.Returns the logical type annotation, ornullif absent.intReturns the maximum definition level, computed from the schema hierarchy.intReturns the maximum repetition level, computed from the schema hierarchy.name()Returns the field name.Returns whether the field is required, optional, or repeated.final StringtoString()Returns a string representation of this record class.type()Returns the physical (storage) type.Returns the fixed byte length of aPhysicalType.FIXED_LEN_BYTE_ARRAYfield, ornullfor any other type.
-
Constructor Details
-
PrimitiveNode
Creates an instance of aPrimitiveNoderecord class.- Parameters:
column- the value for thecolumnrecord component
-
-
Method Details
-
name
-
type
Returns the physical (storage) type. -
repetitionType
Returns whether the field is required, optional, or repeated.- Specified by:
repetitionTypein interfaceSchemaNode
-
typeLength
Returns the fixed byte length of aPhysicalType.FIXED_LEN_BYTE_ARRAYfield, ornullfor any other type. -
logicalType
Returns the logical type annotation, ornullif absent. -
columnIndex
public int columnIndex()Returns the zero-based index among all leaf columns. -
maxDefinitionLevel
public int maxDefinitionLevel()Description copied from interface:SchemaNodeReturns the maximum definition level, computed from the schema hierarchy.- Specified by:
maxDefinitionLevelin interfaceSchemaNode
-
maxRepetitionLevel
public int maxRepetitionLevel()Description copied from interface:SchemaNodeReturns the maximum repetition level, computed from the schema hierarchy.- Specified by:
maxRepetitionLevelin interfaceSchemaNode
-
fieldId
Description copied from interface:SchemaNodeReturns the field id of the schema element (field_idinparquet.thrift), ornullif the element has no field id.- Specified by:
fieldIdin interfaceSchemaNode
-
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). -
column
-