Class HiveApplyProjectionUtil

java.lang.Object
io.trino.plugin.hive.HiveApplyProjectionUtil

public final class HiveApplyProjectionUtil extends Object
  • Method Details

    • find

      public static Optional<String> find(Map<String,ColumnHandle> assignments, ApplyProjectionUtil.ProjectedColumnRepresentation projectedColumn)
      Returns the assignment key corresponding to the column represented by projectedColumn in the assignments, if one exists. The variable in the projectedColumn can itself be a representation of another projected column. For example, say a projected column representation has variable "x" and a dereferenceIndices=[0]. "x" can in-turn map to a projected column handle with base="a" and [1, 2] as dereference indices. Then the method searches for a column handle in assignments with base="a" and dereferenceIndices=[1, 2, 0].