public class ColumnsScanFramework extends FileScanFramework
The logic here is a bit tricky. The CSV (really, "compliant text") reader operates in multiple modes. If a header is required, then the columns array is not allowed. If the header is not loaded, then the columns array must be used.
This class combines the above semantics with the projection list from the query. It handles things like two appearances of the unadorned columns identifier, the use of the columns identifier when it is not allowed, etc.
| Modifier and Type | Class and Description |
|---|---|
static class |
ColumnsScanFramework.ColumnsScanBuilder |
static class |
ColumnsScanFramework.ColumnsSchemaNegotiatorImpl
Implementation of the columns array schema negotiator.
|
FileScanFramework.FileReaderFactory, FileScanFramework.FileRowSetContext, FileScanFramework.FileScanBuilder, FileScanFramework.FileSchemaNegotiator, FileScanFramework.FileSchemaNegotiatorImplManagedScanFramework.ReaderFactory, ManagedScanFramework.ScanFrameworkBuilder| Modifier and Type | Field and Description |
|---|---|
static String |
COLUMNS_COL |
protected ColumnsArrayManager |
columnsArrayManager |
builder, context, readerFactory, scanOrchestrator| Constructor and Description |
|---|
ColumnsScanFramework(ColumnsScanFramework.ColumnsScanBuilder builder) |
| Modifier and Type | Method and Description |
|---|---|
static TupleMetadata |
columnsSchema() |
protected void |
configure() |
protected SchemaNegotiatorImpl |
newNegotiator() |
fileSystem, nextSplit, open, optionsbind, close, context, errorContext, nextReader, outputSchema, scanOrchestratorpublic static final String COLUMNS_COL
protected ColumnsArrayManager columnsArrayManager
public ColumnsScanFramework(ColumnsScanFramework.ColumnsScanBuilder builder)
protected void configure()
configure in class FileScanFrameworkprotected SchemaNegotiatorImpl newNegotiator()
newNegotiator in class FileScanFrameworkpublic static TupleMetadata columnsSchema()
Copyright © 2021 The Apache Software Foundation. All rights reserved.