Package org.apache.flink.formats.csv
Class CsvFileFormatFactory.CsvBulkDecodingFormat
- java.lang.Object
-
- org.apache.flink.formats.csv.CsvFileFormatFactory.CsvBulkDecodingFormat
-
- All Implemented Interfaces:
BulkDecodingFormat<RowData>
,DecodingFormat<BulkFormat<RowData,FileSourceSplit>>
,FileBasedStatisticsReportableInputFormat
,Format
,ProjectableDecodingFormat<BulkFormat<RowData,FileSourceSplit>>
- Enclosing class:
- CsvFileFormatFactory
@VisibleForTesting public static class CsvFileFormatFactory.CsvBulkDecodingFormat extends Object implements BulkDecodingFormat<RowData>, ProjectableDecodingFormat<BulkFormat<RowData,FileSourceSplit>>, FileBasedStatisticsReportableInputFormat
CsvBulkDecodingFormat which implementsFileBasedStatisticsReportableInputFormat
.
-
-
Constructor Summary
Constructors Constructor Description CsvBulkDecodingFormat(ReadableConfig formatOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BulkFormat<RowData,FileSourceSplit>
createRuntimeDecoder(DynamicTableSource.Context context, DataType physicalDataType, int[][] projections)
Creates runtime decoder implementation that is configured to produce data of typeProjection.of(projections).project(physicalDataType)
.ChangelogMode
getChangelogMode()
Returns the set of changes that a connector (and transitively the planner) can expect during runtime.TableStats
reportStatistics(List<Path> files, DataType producedDataType)
Returns the estimated statistics of this input format.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.connector.file.table.format.BulkDecodingFormat
applyFilters
-
Methods inherited from interface org.apache.flink.table.connector.format.DecodingFormat
applyReadableMetadata, listReadableMetadata
-
Methods inherited from interface org.apache.flink.table.connector.format.ProjectableDecodingFormat
createRuntimeDecoder, supportsNestedProjection
-
-
-
-
Constructor Detail
-
CsvBulkDecodingFormat
public CsvBulkDecodingFormat(ReadableConfig formatOptions)
-
-
Method Detail
-
createRuntimeDecoder
public BulkFormat<RowData,FileSourceSplit> createRuntimeDecoder(DynamicTableSource.Context context, DataType physicalDataType, int[][] projections)
Description copied from interface:ProjectableDecodingFormat
Creates runtime decoder implementation that is configured to produce data of typeProjection.of(projections).project(physicalDataType)
. For more details on the usage, checkDecodingFormat
documentation.- Specified by:
createRuntimeDecoder
in interfaceProjectableDecodingFormat<BulkFormat<RowData,FileSourceSplit>>
- Parameters:
context
- the context provides several utilities required to instantiate the runtime decoder implementation of the formatphysicalDataType
- For more details checkDecodingFormat
projections
- the projections array. The array represents the mapping of the fields of the originalDataType
, including nested rows. For example,[[0, 2, 1], ...]
specifies to include the 2nd field of the 3rd field of the 1st field in the top-level row. It's guaranteed that this array won't contain nested projections ifProjectableDecodingFormat.supportsNestedProjection()
returnsfalse
. For more details, checkProjection
as well.- Returns:
- the runtime decoder
- See Also:
DecodingFormat
-
getChangelogMode
public ChangelogMode getChangelogMode()
Description copied from interface:Format
Returns the set of changes that a connector (and transitively the planner) can expect during runtime.- Specified by:
getChangelogMode
in interfaceFormat
-
reportStatistics
public TableStats reportStatistics(List<Path> files, DataType producedDataType)
Description copied from interface:FileBasedStatisticsReportableInputFormat
Returns the estimated statistics of this input format.- Specified by:
reportStatistics
in interfaceFileBasedStatisticsReportableInputFormat
- Parameters:
files
- The files to be estimated.producedDataType
- the final output type of the format.
-
-