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 2021/02/09 09:38:54 UTC
[GitHub] [calcite] Dominick1993 opened a new pull request #2346: [CALCITE-4491] Fix aggregations of nested window functions
Dominick1993 opened a new pull request #2346:
URL: https://github.com/apache/calcite/pull/2346
Dialects which do not support nested aggregations now also don't support
nested window functions.
The added test covers both cases:
- a dialect which supports nested aggregations -> OracleSqlDialect
- a dialect which does not support nested aggregations -> PostgreSqlDialect
----------------------------------------------------------------
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
[GitHub] [calcite] Dominick1993 commented on pull request #2346: [CALCITE-4491] Fix aggregations of nested window functions
Posted by GitBox <gi...@apache.org>.
Dominick1993 commented on pull request #2346:
URL: https://github.com/apache/calcite/pull/2346#issuecomment-775802579
Sorry, working on rebase on top of master now.
----------------------------------------------------------------
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
[GitHub] [calcite] julianhyde closed pull request #2346: [CALCITE-4491] Aggregations of nested window functions produce invalid SQL
Posted by GitBox <gi...@apache.org>.
julianhyde closed pull request #2346:
URL: https://github.com/apache/calcite/pull/2346
----------------------------------------------------------------
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
[GitHub] [calcite] Dominick1993 commented on a change in pull request #2346: [CALCITE-4491] Aggregations of nested window functions
Posted by GitBox <gi...@apache.org>.
Dominick1993 commented on a change in pull request #2346:
URL: https://github.com/apache/calcite/pull/2346#discussion_r573730700
##########
File path: core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java
##########
@@ -1803,9 +1805,14 @@ private boolean needNewSubQuery(
if (rel instanceof Aggregate) {
final Aggregate agg = (Aggregate) rel;
- final boolean hasNestedAgg = hasNestedAggregations(agg);
+ final boolean hasNestedAgg = hasNested(agg, operand ->
+ operand instanceof SqlCall
Review comment:
@julianhyde I wasn't sure whether this check should be a part of `hasNested` method or a part of the predicate. I've chosen to go with the more generic predicate approach here, but please let me know your preference.
----------------------------------------------------------------
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