Class ParquetSchemaReader
java.lang.Object
com.illumon.iris.db.v2.locations.parquet.ParquetSchemaReader
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static final class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparseMetadata
(Map<String, String> keyValueMetadata) static ParquetInstructions
readParquetSchema
(org.apache.parquet.schema.MessageType schema, Map<String, String> keyValueMetadata, ParquetInstructions readInstructions, ParquetSchemaReader.ColumnDefinitionConsumer consumer, BiFunction<String, Set<String>, String> legalizeColumnNameFunc) Obtain schema information from a parquet file
-
Constructor Details
-
ParquetSchemaReader
public ParquetSchemaReader()
-
-
Method Details
-
parseMetadata
-
readParquetSchema
public static ParquetInstructions readParquetSchema(@NotNull org.apache.parquet.schema.MessageType schema, @NotNull Map<String, String> keyValueMetadata, @NotNull ParquetInstructions readInstructions, @NotNull ParquetSchemaReader.ColumnDefinitionConsumer consumer, @NotNull BiFunction<String, Set<String>, String> legalizeColumnNameFunc) Obtain schema information from a parquet file- Parameters:
schema
- Parquet schema. DO NOT RELY ONParquetMetadataConverter
FOR THIS! USEParquetFileReader
!keyValueMetadata
- Parquet key-value metadata mapreadInstructions
- Parquet read instructions specifying transformations like column mappings and codecs. Note a new read instructions based on this one may be returned by this method to provide necessary transformations, eg, replacing unsupported characters like ' ' (space) in column names.consumer
- A ColumnDefinitionConsumer whose accept method would be called for each column in the file- Returns:
- Parquet read instructions, either the ones supplied or a new object based on the supplied with necessary transformations added.
-