public abstract class FileFormat extends Object
NOTE: This class must be thread safe.
Modifier and Type | Field and Description |
---|---|
protected String |
formatIdentifier |
Modifier | Constructor and Description |
---|---|
protected |
FileFormat(String formatIdentifier) |
Modifier and Type | Method and Description |
---|---|
FormatReaderFactory |
createReaderFactory(RowType rowType) |
abstract FormatReaderFactory |
createReaderFactory(RowType projectedRowType,
List<Predicate> filters)
Create a
FormatReaderFactory from the type, with projection pushed down. |
Optional<SimpleStatsExtractor> |
createStatsExtractor(RowType type,
SimpleColStatsCollector.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) |
String |
getFormatIdentifier() |
protected Options |
getIdentifierPrefixOptions(Options options) |
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 projectedRowType, @Nullable List<Predicate> filters)
FormatReaderFactory
from the type, with projection pushed down.projectedRowType
- Type with 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 Optional<SimpleStatsExtractor> createStatsExtractor(RowType type, SimpleColStatsCollector.Factory[] statsCollectors)
public static FileFormat fromIdentifier(String identifier, Options options)
public static FileFormat fromIdentifier(String identifier, FileFormatFactory.FormatContext context)
FileFormat
from format identifier and format options.Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.