Class ParquetSchemaUtil

java.lang.Object
io.deephaven.parquet.impl.ParquetSchemaUtil

public final class ParquetSchemaUtil extends Object
Various improved ways of traversing MessageType.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Optional<org.apache.parquet.column.ColumnDescriptor>
    columnDescriptor(org.apache.parquet.schema.MessageType schema, String[] path)
    A more efficient implementation of MessageType.getColumnDescription(String[]).
    static Optional<org.apache.parquet.column.ColumnDescriptor>
    columnDescriptor(org.apache.parquet.schema.MessageType schema, List<String> path)
    A more efficient implementation of MessageType.getColumnDescription(String[]).
    static List<org.apache.parquet.column.ColumnDescriptor>
    columns(org.apache.parquet.schema.MessageType schema)
    A more efficient implementation of MessageType.getColumns().
    static boolean
    contains(org.apache.parquet.schema.MessageType schema, org.apache.parquet.column.ColumnDescriptor descriptor)
    Checks if schema contains descriptor based on ColumnDescriptorUtil.equals(ColumnDescriptor, ColumnDescriptor).
    static org.apache.parquet.column.ColumnDescriptor
    makeColumnDescriptor(Collection<org.apache.parquet.schema.Type> typePath, org.apache.parquet.schema.PrimitiveType primitiveType)
     
    static List<String[]>
    paths(org.apache.parquet.schema.MessageType schema)
    A more efficient implementation of MessageType.getPaths().
    static void
    walk(org.apache.parquet.schema.MessageType schema, ParquetSchemaUtil.Visitor visitor)
    An alternative interface for traversing the leaf fields of a Parquet schema.
    static void
    walkColumnDescriptors(org.apache.parquet.schema.MessageType schema, Consumer<org.apache.parquet.column.ColumnDescriptor> consumer)
    An alternative interface for traversing the column descriptors of a Parquet schema.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ParquetSchemaUtil

      public ParquetSchemaUtil()
  • Method Details

    • columns

      public static List<org.apache.parquet.column.ColumnDescriptor> columns(org.apache.parquet.schema.MessageType schema)
      A more efficient implementation of MessageType.getColumns().
    • paths

      public static List<String[]> paths(org.apache.parquet.schema.MessageType schema)
      A more efficient implementation of MessageType.getPaths().
    • walkColumnDescriptors

      public static void walkColumnDescriptors(org.apache.parquet.schema.MessageType schema, Consumer<org.apache.parquet.column.ColumnDescriptor> consumer)
      An alternative interface for traversing the column descriptors of a Parquet schema.
    • walk

      public static void walk(org.apache.parquet.schema.MessageType schema, ParquetSchemaUtil.Visitor visitor)
      An alternative interface for traversing the leaf fields of a Parquet schema.
    • columnDescriptor

      public static Optional<org.apache.parquet.column.ColumnDescriptor> columnDescriptor(org.apache.parquet.schema.MessageType schema, String[] path)
      A more efficient implementation of MessageType.getColumnDescription(String[]).
    • columnDescriptor

      public static Optional<org.apache.parquet.column.ColumnDescriptor> columnDescriptor(org.apache.parquet.schema.MessageType schema, List<String> path)
      A more efficient implementation of MessageType.getColumnDescription(String[]).
    • makeColumnDescriptor

      public static org.apache.parquet.column.ColumnDescriptor makeColumnDescriptor(Collection<org.apache.parquet.schema.Type> typePath, org.apache.parquet.schema.PrimitiveType primitiveType)
    • contains

      public static boolean contains(org.apache.parquet.schema.MessageType schema, org.apache.parquet.column.ColumnDescriptor descriptor)
      Checks if schema contains descriptor based on ColumnDescriptorUtil.equals(ColumnDescriptor, ColumnDescriptor).