You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/11/14 23:41:43 UTC

[GitHub] [calcite] julianhyde commented on a change in pull request #1556: [CALCITE-3438] Validator should disallow use of the GROUPING function inside a FILTER clause

julianhyde commented on a change in pull request #1556: [CALCITE-3438] Validator should disallow use of the GROUPING function inside a FILTER clause 
URL: https://github.com/apache/calcite/pull/1556#discussion_r346602042
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/sql/validate/AggVisitor.java
 ##########
 @@ -44,6 +44,9 @@
    * or group auxiliary functions (e.g. {@code TUMBLE_START}). */
   protected final boolean group;
   protected final SqlNameMatcher nameMatcher;
+  /** Whether to find grouping functions (i.e., {@code GROUP_ID},
+   * {@code GROUPING_ID}, {@code GROUPING}).*/
+  private boolean grouping = false;
 
 Review comment:
   I don't think the `grouping` field is necessary. If `AggFinder` treats grouping functions (e.g. GROUP_ID) as aggregate functions (e.g. SUM) by default, we get what we need.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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