Class ImplicitColumnResolver
java.lang.Object
org.apache.drill.exec.physical.impl.scan.v3.file.ImplicitColumnResolver
Manages the resolution of implicit file metadata and partition columns.
Parses the file metadata columns from the projection list. Creates a parse
result which drives loading data into vectors. Supports renaming the columns
via session options.
Lifecycle:
- At the start of the scan, the parser looks for implicit and partition columns in the scan schema, resolving matching columns to be implicit columns, and building up a description of those columns for use later.
- If the projection list contains a wildcard, it can also contain implicit columns. If running in legacy mode, inserts partition columns when the query contains a wildcard.
- On each file (on each reader), the parse result allows generating actual values for each column, which are then written into the corresponding value vectors.
Assumes that the partition count is fixed at runtime; that it is determined at plan time and provided in the plan. This ensures that the schema is stable across readers: even a reader at the top-most partition will produce columns for all partitions if using legacy mode wildcard expansion.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
The result of scanning the scan output schema to identify implicit and partition columns. -
Field Summary
Modifier and TypeFieldDescriptionstatic final TypeProtos.MajorType
static final TypeProtos.MajorType
static final TypeProtos.MajorType
-
Constructor Summary
ConstructorDescriptionImplicitColumnResolver
(ImplicitColumnResolver.ImplicitColumnOptions options, CustomErrorContext errorContext) -
Method Summary
-
Field Details
-
IMPLICIT_COL_TYPE
-
PARTITION_COL_TYPE
-
OPTIONAL_INTERNAL_COL_TYPE
-
-
Constructor Details
-
ImplicitColumnResolver
public ImplicitColumnResolver(ImplicitColumnResolver.ImplicitColumnOptions options, CustomErrorContext errorContext)
-
-
Method Details
-
parse
-
partitionName
-