@PublicEvolving public interface AggregatedTable
Modifier and Type | Method and Description |
---|---|
Table |
select(Expression... fields)
Performs a selection operation after an aggregate operation.
|
Table select(Expression... fields)
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")
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.