Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.3.1
-
None
Description
For example:
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/batch/sql/AggregationsITCase.scala
@Test def testTableAggregationWithMultipleTableAPI(): Unit = { val env = ExecutionEnvironment.getExecutionEnvironment val tEnv = TableEnvironment.getTableEnvironment(env, config) val inputTable = CollectionDataSets.getSmallNestedTupleDataSet(env).toTable(tEnv, 'a, 'b) tEnv.registerDataSet("MyTable", inputTable) val result = tEnv.scan("MyTable") .where('a.get("_1") > 0) .select('a.get("_1").avg, 'a.get("_2").sum, 'b.count) val expected = "2,6,3" val results = result.toDataSet[Row].collect() TestBaseUtils.compareResultAsText(results.asJava, expected) }