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
Nested ClassesModifier and TypeClassDescriptionstatic classFilter for a map, represented by aTupleMetadata.static enumDescribes how to handle candidate columns not currently in the scan schema, which turns out to be a surprisingly complex question.static classFilter 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
FieldsModifier and TypeFieldDescriptionprotected final CustomErrorContextprotected final DynamicSchemaFilter.NewColumnsModeprotected final StringFields inherited from interface org.apache.drill.exec.physical.resultSet.impl.ProjectionFilter
logger, NOT_PROJECTED, PROJECT_ALL, PROJECT_NONE, PROJECTED -
Constructor Summary
ConstructorsConstructorDescriptionDynamicSchemaFilter(CustomErrorContext errorContext, String source, DynamicSchemaFilter.NewColumnsMode newColumnsMode) -
Method Summary
Modifier and TypeMethodDescriptionbuildProjection(ColumnMetadata schemaCol, ColumnMetadata probeCol) protected ProjectionFilter.ProjResultfromSchema(ColumnMetadata schemaCol, ColumnMetadata probeCol) A column exists in the scan schema, and is concrete.booleanisProjected(String colName) protected ProjectionFilter.ProjResultMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
isProjectedin interfaceProjectionFilter
-