You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by fhueske <gi...@git.apache.org> on 2017/02/17 11:18:26 UTC

[GitHub] flink pull request #3111: [FLINK-3475] [Table] DISTINCT aggregate function s...

Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3111#discussion_r101733413
  
    --- Diff: flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/batch/sql/AggregationsITCase.scala ---
    @@ -213,34 +213,45 @@ class AggregationsITCase(
         TestBaseUtils.compareResultAsText(results.asJava, expected)
       }
     
    -  @Test(expected = classOf[TableException])
    +  @Test
       def testDistinctAggregate(): Unit = {
     
         val env = ExecutionEnvironment.getExecutionEnvironment
         val tEnv = TableEnvironment.getTableEnvironment(env, config)
     
         val sqlQuery = "SELECT sum(_1) as a, count(distinct _3) as b FROM MyTable"
     
    -    val ds = CollectionDataSets.get3TupleDataSet(env)
    -    tEnv.registerDataSet("MyTable", ds)
    +    val ds = env.fromElements(
    --- End diff --
    
    I think it would be good to use a bit more test data here, like on of the `CollectionDataSets`.
    ITCases are rather expensive to run, so we should to get the most out of them.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---