Class FileSchema

java.lang.Object
dev.hardwood.schema.FileSchema

public class FileSchema extends Object
Root schema container representing the complete Parquet schema. Supports both flat schemas and nested structures (structs, lists).
  • Method Details

    • getName

      public String getName()
    • getColumns

      public List<ColumnSchema> getColumns()
    • getColumn

      public ColumnSchema getColumn(int index)
    • getColumn

      public ColumnSchema getColumn(String name)
    • getColumnCount

      public int getColumnCount()
    • getRootNode

      public SchemaNode.GroupNode getRootNode()
      Returns the hierarchical schema tree representation.
    • getField

      public SchemaNode getField(String name)
      Finds a top-level field by name in the schema tree.
    • isFlatSchema

      public boolean isFlatSchema()
      Returns true if this schema supports direct columnar access. For such schemas, enabling direct columnar access without record assembly.

      A schema supports columnar access if all top-level fields are primitives (no nested structs, lists, or maps) and no columns have repetition.

    • fromSchemaElements

      public static FileSchema fromSchemaElements(List<SchemaElement> elements)
      Reconstruct schema from Thrift SchemaElement list.
    • toString

      public String toString()
      Overrides:
      toString in class Object