Interface AggregatedTable


@PublicEvolving public interface AggregatedTable
A table that has been performed on the aggregate function.
  • Method Summary

    Modifier and Type
    Method
    Description
    select(org.apache.flink.table.expressions.Expression... fields)
    Performs a selection operation after an aggregate operation.
  • Method Details

    • select

      Table select(org.apache.flink.table.expressions.Expression... fields)
      Performs a selection operation after an aggregate operation. The field expressions cannot contain table functions and aggregations.

      Example:

      
       tableEnv.createTemporarySystemFunction("aggFunc", MyAggregateFunction.class);
       table.groupBy($("key"))
         .aggregate(call("aggFunc", $("a"), $("b")).as("f0", "f1", "f2"))
         .select($("key"), $("f0"), $("f1"));
       

      Scala Example:

      
       val aggFunc = new MyAggregateFunction
       table.groupBy($"key")
         .aggregate(aggFunc($"a", $"b") as ("f0", "f1", "f2"))
         .select($"key", $"f0", $"f1")