public class ScanLevelProjection extends Object
The projection list is per scan, independent of any tables that the scanner might scan. The projection list is then used as input to the per-table projection planning.
Accepts the inputs needed to plan a projection, builds the mappings, and constructs the projection mapping object.
Builds the per-scan projection plan given a set of projected columns. Determines the output schema, which columns to project from the data source, which are metadata, and so on.
An annoying aspect of SQL is that the projection list (the list of columns to appear in the output) is specified after the SELECT keyword. In Relational theory, projection is about columns, selection is about rows...
org.apache.drill.exec.store.ColumnExplorer}, the class from which this class
evolved
Modifier and Type | Class and Description |
---|---|
static class |
ScanLevelProjection.Builder |
static interface |
ScanLevelProjection.ScanProjectionParser
Interface for add-on parsers, avoids the need to create
a single, tightly-coupled parser for all types of columns.
|
static class |
ScanLevelProjection.ScanProjectionType
Identifies the kind of projection done for this scan.
|
Modifier and Type | Field and Description |
---|---|
protected CustomErrorContext |
errorContext
Context used with error messages.
|
protected boolean |
includesWildcard |
protected List<ColumnProjection> |
outputCols |
protected RequestedTuple |
outputProjection
Projection definition for the scan a whole.
|
protected List<ScanLevelProjection.ScanProjectionParser> |
parsers |
protected List<SchemaPath> |
projectionList |
protected ScanLevelProjection.ScanProjectionType |
projectionType |
protected ProjectionFilter |
readerProjection
Projection definition passed to each reader.
|
protected TupleMetadata |
readerSchema |
protected boolean |
sawWildcard |
protected final CustomErrorContext errorContext
protected final List<SchemaPath> projectionList
protected final TupleMetadata readerSchema
protected List<ScanLevelProjection.ScanProjectionParser> parsers
protected boolean includesWildcard
protected boolean sawWildcard
protected List<ColumnProjection> outputCols
protected RequestedTuple outputProjection
protected ProjectionFilter readerProjection
protected ScanLevelProjection.ScanProjectionType projectionType
public static ScanLevelProjection.Builder builder()
public static ScanLevelProjection build(List<SchemaPath> projectionList, List<ScanLevelProjection.ScanProjectionParser> parsers)
public static ScanLevelProjection build(List<SchemaPath> projectionList, List<ScanLevelProjection.ScanProjectionParser> parsers, TupleMetadata outputSchema)
public void addTableColumn(ColumnProjection outCol)
public void addMetadataColumn(ColumnProjection outCol)
public CustomErrorContext context()
public List<SchemaPath> requestedCols()
public List<ColumnProjection> columns()
public ScanLevelProjection.ScanProjectionType projectionType()
public boolean projectAll()
public boolean isEmptyProjection()
public RequestedTuple rootProjection()
public ProjectionFilter readerProjection()
public boolean hasReaderSchema()
public TupleMetadata readerSchema()
Copyright © 1970 The Apache Software Foundation. All rights reserved.