public class OrcFileFormat extends FileFormat
FileFormat
. The main code is copied from Flink OrcFileFormatFactory
.formatIdentifier
Constructor and Description |
---|
OrcFileFormat(org.apache.flink.configuration.Configuration formatOptions) |
Modifier and Type | Method and Description |
---|---|
org.apache.flink.connector.file.src.reader.BulkFormat<org.apache.flink.table.data.RowData,org.apache.flink.connector.file.src.FileSourceSplit> |
createReaderFactory(org.apache.flink.table.types.logical.RowType type,
int[][] projection,
List<Predicate> filters)
Create a
BulkFormat from the type, with projection pushed down. |
Optional<FileStatsExtractor> |
createStatsExtractor(org.apache.flink.table.types.logical.RowType type) |
org.apache.flink.api.common.serialization.BulkWriter.Factory<org.apache.flink.table.data.RowData> |
createWriterFactory(org.apache.flink.table.types.logical.RowType type)
The
OrcBulkWriterFactory will create ThreadLocalClassLoaderConfiguration from
the input writer config to avoid classloader leaks. |
createReaderFactory, createReaderFactory, fromIdentifier, fromTableOptions, getFormatIdentifier
public OrcFileFormat(org.apache.flink.configuration.Configuration formatOptions)
public Optional<FileStatsExtractor> createStatsExtractor(org.apache.flink.table.types.logical.RowType type)
createStatsExtractor
in class FileFormat
public org.apache.flink.connector.file.src.reader.BulkFormat<org.apache.flink.table.data.RowData,org.apache.flink.connector.file.src.FileSourceSplit> createReaderFactory(org.apache.flink.table.types.logical.RowType type, int[][] projection, @Nullable List<Predicate> filters)
FileFormat
BulkFormat
from the type, with projection pushed down.createReaderFactory
in class FileFormat
type
- Type without projection.projection
- See Projection.toNestedIndexes()
.filters
- A list of filters in conjunctive form for filtering on a best-effort basis.public org.apache.flink.api.common.serialization.BulkWriter.Factory<org.apache.flink.table.data.RowData> createWriterFactory(org.apache.flink.table.types.logical.RowType type)
OrcBulkWriterFactory
will create ThreadLocalClassLoaderConfiguration
from
the input writer config to avoid classloader leaks.
TODO: The ThreadLocalClassLoaderConfiguration
in OrcBulkWriterFactory
should be removed after https://issues.apache.org/jira/browse/ORC-653 is fixed.
createWriterFactory
in class FileFormat
type
- The data type for the BulkWriter
BulkWriter
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.