You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/11/17 10:11:28 UTC

[GitHub] xueyumusic commented on a change in pull request #7079: [FLINK-10845][table] Support multiple different DISTINCT aggregates for batch

xueyumusic commented on a change in pull request #7079: [FLINK-10845][table] Support multiple different DISTINCT aggregates for batch
URL: https://github.com/apache/flink/pull/7079#discussion_r234403497
 
 

 ##########
 File path: flink-libraries/flink-table/src/test/scala/org/apache/flink/table/runtime/batch/sql/AggregateITCase.scala
 ##########
 @@ -559,4 +559,57 @@ class AggregateITCase(
 
     TestBaseUtils.compareResultAsText(result.asJava, expected)
   }
+
+  @Test
+  def testMultipleDistinctWithDiffParams(): Unit = {
+    val env = ExecutionEnvironment.getExecutionEnvironment
+    val tEnv = TableEnvironment.getTableEnvironment(env, config)
+    val sqlQuery =
+      "SELECT b, " +
+      "  SUM(DISTINCT (a / 3)), " +
+      "  COUNT(DISTINCT SUBSTRING(c FROM 1 FOR 2))," +
+      "  COUNT(DISTINCT c) " +
+      "FROM MyTable " +
+      "GROUP BY b " +
+      "ORDER BY b"
+
+    val data = new scala.collection.mutable.MutableList[(Int, Long, String)]
 
 Review comment:
   updated, thank you very much for review and suggestions~, @hequn8128 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services