julianhyde commented on a change in pull request #1606: [CALCITE-3466] Do not
drop the "group by" clause of subquery in a select statement with "group by"
clause in JDBC adapter.
URL: https://github.com/apache/calcite/pull/1606#discussion_r366036818
##########
File path:
core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java
##########
@@ -1337,6 +1345,16 @@ public Clause maxClause() {
return maxClause;
}
+ /** return whether {@code Clause.GROUP_BY} is contained in {@code clauses}
*/
+ private boolean withGroupBy() {
+ for (Clause clause : clauses) {
+ if (clause == Clause.GROUP_BY) {
Review comment:
I agree. `clauses.contains(Clause.GROUP_BY)` does the same job.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services