Class ImplicitColumnResolver

java.lang.Object
org.apache.drill.exec.physical.impl.scan.v3.file.ImplicitColumnResolver

public class ImplicitColumnResolver extends Object
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.