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

    https://github.com/apache/flink/pull/1761#discussion_r55023665
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/table.scala
 ---
    @@ -385,16 +387,23 @@ class GroupedTable(
           .map(_._2).reduce( (x,y) => x ::: y)
     
         // apply aggregations
    -    if (aggCalls.nonEmpty) {
    -      relBuilder.aggregate(groupKey, aggCalls.toIterable.asJava)
    -    }
    +    relBuilder.aggregate(groupKey, aggCalls.toIterable.asJava)
     
         // get selection expressions
    -    val exprs: List[RexNode] = extractedAggCalls
    -      .map(_._1)
    -      .map(toRexNode(_, relBuilder))
    +    val exprs: List[RexNode] = try {
    +       extractedAggCalls
    +        .map(_._1)
    +        .map(toRexNode(_, relBuilder))
    +    }
    +    catch {
    +      case iae: IllegalArgumentException  =>
    +        throw new IllegalArgumentException(
    +        "Only grouping fields and aggregations allowed after groupBy.", 
iae)
    --- End diff --
    
    Wrong indention.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to