Class TupleState.MapColumnState

Enclosing class:
TupleState

public static class TupleState.MapColumnState extends ColumnState.BaseContainerColumnState
Represents a map column (either single or repeated). Includes maps that are top-level, nested within other maps, or nested inside a union. Schema management is a bit complex:
ConditionAction
Outside of UnionInside of Union
UnprojectedN/AOmitted from output
Added in prior batchIncluded in output
Added in present batch, before overflow Included in output
Added in present batch, after overflow Omitted from output this batch (added next batch) Included in output

The above rules say that, for maps in a union, the output schema is identical to the internal writer schema. But, for maps outside of union, the output schema is a subset of the internal schema with two types of omissions:

  • Unprojected columns
  • Columns added after overflow
  • </ul

    New columns can be added at any time for data readers that discover their schema as data is read (such as JSON). In this case, new columns always appear at the end of the map (remember, in Drill, a "map" is actually a structured: an ordered, named list of columns.) When looking for newly added columns, they will always be at the end.

  • Field Details

  • Constructor Details

  • Method Details

    • mapState

      public TupleState.MapState mapState()
    • container

      public ContainerState container()
      Specified by:
      container in class ColumnState.BaseContainerColumnState
    • isProjected

      public boolean isProjected()
      Overrides:
      isProjected in class ColumnState
    • isVersioned

      public boolean isVersioned()
      Indicate if this map is versioned. A versionable map has three attributes:
      1. Columns can be unprojected. (Columns appear as writers for the client of the result set loader, but are not materialized and do not appear in the projected output container.
      2. Columns appear in the output only if added before the overflow row.
      3. As a result, the output schema is a subset of the internal input schema.