public class ColumnsArrayManager extends Object implements ReaderLevelProjection.ReaderProjectionResolver
The columns mechanism works in conjunction with a reader that is aware of this model. For example, the text reader can be configured to use the columns mechanism, or to pick out columns by name. The reader and this mechanism must be coordinated: configure this mechanism only when the reader itself is configured to use model. That configuration is done outside of this mechanism; it is typically done when setting up the scan operator.
The output of this mechanism is a specialized projected column that identifies itself as the columns column, and optionally holds the list of selected elements.
ScanSchemaOrchestrator. The associated parser handles the scan-level
projection resolution.
The reader produces a schema with a single column, columns, of the agreed-upon type (as configured here.)
Although the ResultSetLoader automatically handles column-level
projection; it does not handle array-level projection. (Perhaps we might want
to add that later.) Instead, the reader is given a pointer to this mechanism
from which it can retrieve the desired set of array items, and writes only those
items to the array column via the usual vector writer mechanism.
| Constructor and Description |
|---|
ColumnsArrayManager(boolean requireColumnsArray) |
ColumnsArrayManager(boolean requireColumnsArray,
boolean allowOtherCols) |
| Modifier and Type | Method and Description |
|---|---|
boolean[] |
elementProjection() |
boolean |
hasColumnsArrayColumn() |
ScanLevelProjection.ScanProjectionParser |
projectionParser() |
boolean |
resolveColumn(ColumnProjection col,
ResolvedTuple outputTuple,
TupleMetadata tableSchema) |
ReaderLevelProjection.ReaderProjectionResolver |
resolver() |
void |
startResolution() |
public ColumnsArrayManager(boolean requireColumnsArray,
boolean allowOtherCols)
public ColumnsArrayManager(boolean requireColumnsArray)
public ScanLevelProjection.ScanProjectionParser projectionParser()
public ReaderLevelProjection.ReaderProjectionResolver resolver()
public void startResolution()
startResolution in interface ReaderLevelProjection.ReaderProjectionResolverpublic boolean resolveColumn(ColumnProjection col, ResolvedTuple outputTuple, TupleMetadata tableSchema)
resolveColumn in interface ReaderLevelProjection.ReaderProjectionResolverpublic boolean[] elementProjection()
public boolean hasColumnsArrayColumn()
Copyright © 2021 The Apache Software Foundation. All rights reserved.