Class DynamicSchemaFilter
java.lang.Object
org.apache.drill.exec.physical.impl.scan.v3.schema.DynamicSchemaFilter
- All Implemented Interfaces:
ProjectionFilter
- Direct Known Subclasses:
DynamicSchemaFilter.DynamicTupleFilter
,DynamicSchemaFilter.RowSchemaFilter
Projection filter based on the scan schema which typically starts as fully
dynamic, then becomes more concrete as the scan progresses. Enforces that
projected columns must be consistent with either projection, or the existing
concrete schema for that columns.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Filter for a map, represented by aTupleMetadata
.static enum
Describes how to handle candidate columns not currently in the scan schema, which turns out to be a surprisingly complex question.static class
Filter for the top-level dynamic schema.Nested classes/interfaces inherited from interface org.apache.drill.exec.physical.resultSet.impl.ProjectionFilter
ProjectionFilter.BaseSchemaProjectionFilter, ProjectionFilter.CompoundProjectionFilter, ProjectionFilter.DirectProjectionFilter, ProjectionFilter.ImplicitProjectionFilter, ProjectionFilter.ProjResult, ProjectionFilter.SchemaProjectionFilter, ProjectionFilter.TypeProjectionFilter
-
Field Summary
Modifier and TypeFieldDescriptionprotected final CustomErrorContext
protected final DynamicSchemaFilter.NewColumnsMode
protected final String
Fields inherited from interface org.apache.drill.exec.physical.resultSet.impl.ProjectionFilter
logger, NOT_PROJECTED, PROJECT_ALL, PROJECT_NONE, PROJECTED
-
Constructor Summary
ConstructorDescriptionDynamicSchemaFilter
(CustomErrorContext errorContext, String source, DynamicSchemaFilter.NewColumnsMode newColumnsMode) -
Method Summary
Modifier and TypeMethodDescriptionbuildProjection
(ColumnMetadata schemaCol, ColumnMetadata probeCol) protected ProjectionFilter.ProjResult
fromSchema
(ColumnMetadata schemaCol, ColumnMetadata probeCol) A column exists in the scan schema, and is concrete.boolean
isProjected
(String colName) protected ProjectionFilter.ProjResult
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.drill.exec.physical.resultSet.impl.ProjectionFilter
isEmpty, projection
-
Field Details
-
errorContext
-
source
-
newColumnsMode
-
-
Constructor Details
-
DynamicSchemaFilter
public DynamicSchemaFilter(CustomErrorContext errorContext, String source, DynamicSchemaFilter.NewColumnsMode newColumnsMode)
-
-
Method Details
-
buildProjection
public ProjectionFilter.ProjResult buildProjection(ColumnMetadata schemaCol, ColumnMetadata probeCol) -
newColumnProjection
-
fromSchema
A column exists in the scan schema, and is concrete. The proposed column can be projected. Verify consistency. The reader should not be proposing a column with the wrong type or mode since it was told the reader input schema, and that schema was derived from a provided schema (which should be acceptable to the reader) or by a prior reader in the same scan. -
isProjected
- Specified by:
isProjected
in interfaceProjectionFilter
-