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 2016/03/04 10:14:14 UTC

[GitHub] flink pull request: [FLINK-3567] Fix selection on grouping. Only g...

GitHub user fhueske opened a pull request:

    https://github.com/apache/flink/pull/1761

    [FLINK-3567] Fix selection on grouping. Only grouping keys or aggregates allowed.

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/fhueske/flink tableGrouping

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/1761.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1761
    
----
commit 3665f3c5c4dd7681f01d1df7d0e126d932bc893e
Author: Fabian Hueske <fh...@apache.org>
Date:   2016-03-04T08:51:19Z

    [FLINK-3567] Fix selection on grouping. Only grouping keys or aggregates allowed.

----


---
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.
---

[GitHub] flink pull request: [FLINK-3567] Fix selection on grouping. Only g...

Posted by twalthr <gi...@git.apache.org>.
Github user twalthr commented on the pull request:

    https://github.com/apache/flink/pull/1761#issuecomment-192259728
  
    Looks good to merge (besides a small comment).


---
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.
---

[GitHub] flink pull request: [FLINK-3567] Fix selection on grouping. Only g...

Posted by fhueske <gi...@git.apache.org>.
Github user fhueske closed the pull request at:

    https://github.com/apache/flink/pull/1761


---
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.
---

[GitHub] flink pull request: [FLINK-3567] Fix selection on grouping. Only g...

Posted by vasia <gi...@git.apache.org>.
Github user vasia commented on the pull request:

    https://github.com/apache/flink/pull/1761#issuecomment-193324103
  
    You can close this @fhueske!


---
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.
---

[GitHub] flink pull request: [FLINK-3567] Fix selection on grouping. Only g...

Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on the pull request:

    https://github.com/apache/flink/pull/1761#issuecomment-193333836
  
    Thanks!


---
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.
---

[GitHub] flink pull request: [FLINK-3567] Fix selection on grouping. Only g...

Posted by vasia <gi...@git.apache.org>.
Github user vasia commented on the pull request:

    https://github.com/apache/flink/pull/1761#issuecomment-193258467
  
    Merging this one, too.


---
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.
---

[GitHub] flink pull request: [FLINK-3567] Fix selection on grouping. Only g...

Posted by twalthr <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---