[ 
https://issues.apache.org/jira/browse/FLINK-3939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15295814#comment-15295814
 ] 

ASF GitHub Bot commented on FLINK-3939:
---------------------------------------

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

    https://github.com/apache/flink/pull/2014#discussion_r64160758
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/plan/rules/dataSet/DataSetAggregateRule.scala
 ---
    @@ -33,20 +33,32 @@ class DataSetAggregateRule
           "DataSetAggregateRule")
       {
     
    -    def convert(rel: RelNode): RelNode = {
    -      val agg: LogicalAggregate = rel.asInstanceOf[LogicalAggregate]
    -      val traitSet: RelTraitSet = 
rel.getTraitSet.replace(DataSetConvention.INSTANCE)
    -      val convInput: RelNode = RelOptRule.convert(agg.getInput, 
DataSetConvention.INSTANCE)
    -
    -      new DataSetAggregate(
    -        rel.getCluster,
    -        traitSet,
    -        convInput,
    -        agg.getNamedAggCalls,
    -        rel.getRowType,
    -        agg.getInput.getRowType,
    -        agg.getGroupSet.toArray)
    -      }
    +  override def matches(call: RelOptRuleCall): Boolean = {
    --- End diff --
    
    Is that possible we add an `UnsupportedOperatorRule` to match unsupported 
plan and throws an `TableException` on `convert` method?


> Prevent distinct aggregates and grouping sets from being translated
> -------------------------------------------------------------------
>
>                 Key: FLINK-3939
>                 URL: https://issues.apache.org/jira/browse/FLINK-3939
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API
>            Reporter: Fabian Hueske
>            Assignee: Fabian Hueske
>             Fix For: 1.1.0
>
>
> Flink's SQL interface is currently not capable of executing distinct 
> aggregates and grouping sets.
> We need to prevent that queries with these operations are translated by 
> adapting the DataSetAggregateRule.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to