public abstract class FileFormat extends Object
NOTE: This class must be thread safe.
| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
formatIdentifier |
| 限定符 | 构造器和说明 |
|---|---|
protected |
FileFormat(String formatIdentifier) |
| 限定符和类型 | 方法和说明 |
|---|---|
FormatReaderFactory |
createReaderFactory(RowType rowType) |
FormatReaderFactory |
createReaderFactory(RowType rowType,
int[][] projection) |
abstract FormatReaderFactory |
createReaderFactory(RowType type,
int[][] projection,
List<Predicate> filters)
Create a
FormatReaderFactory from the type, with projection pushed down. |
Optional<TableStatsExtractor> |
createStatsExtractor(RowType type,
FieldStatsCollector.Factory[] statsCollectors) |
abstract FormatWriterFactory |
createWriterFactory(RowType type)
Create a
FormatWriterFactory from the type. |
static FileFormat |
fromIdentifier(String identifier,
FileFormatFactory.FormatContext context)
Create a
FileFormat from format identifier and format options. |
static FileFormat |
fromIdentifier(String identifier,
Options options) |
static FileFormat |
getFileFormat(Options options,
String formatIdentifier) |
String |
getFormatIdentifier() |
abstract void |
validateDataFields(RowType rowType)
Validate data field type supported or not.
|
protected String formatIdentifier
protected FileFormat(String formatIdentifier)
public String getFormatIdentifier()
public abstract FormatReaderFactory createReaderFactory(RowType type, int[][] projection, @Nullable List<Predicate> filters)
FormatReaderFactory from the type, with projection pushed down.type - Type without projection.filters - A list of filters in conjunctive form for filtering on a best-effort basis.public abstract FormatWriterFactory createWriterFactory(RowType type)
FormatWriterFactory from the type.public abstract void validateDataFields(RowType rowType)
public FormatReaderFactory createReaderFactory(RowType rowType)
public FormatReaderFactory createReaderFactory(RowType rowType, int[][] projection)
public Optional<TableStatsExtractor> createStatsExtractor(RowType type, FieldStatsCollector.Factory[] statsCollectors)
@VisibleForTesting public static FileFormat fromIdentifier(String identifier, Options options)
public static FileFormat fromIdentifier(String identifier, FileFormatFactory.FormatContext context)
FileFormat from format identifier and format options.public static FileFormat getFileFormat(Options options, String formatIdentifier)
Copyright © 2023 The Apache Software Foundation. All rights reserved.