@Nullable
  public Boolean areColumnsAggregated(RelNode input, ImmutableBitSet columns) {
    for (;;) {
      try {
        return aggOriginHandler.areColumnsAggregated(input, this, columns);
      } catch (JaninoRelMetadataProvider.NoHandler e) {
        aggOriginHandler = revise(e.relClass, AggregatedColumns.DEF);
      }
    }
  }
Returns the {@link AggregatedColumns} statistic.

@param input the input relational expression
@param columns mask representing a subset of columns for the input relational expression.
@return whether the specified columns originate from aggregate functions or null if there is not enough information
to infer the origin function.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/stats/HiveRelMetadataQuery.java