julianhyde commented on a change in pull request #1515: fix some correlated
subquery case's comment error
URL: https://github.com/apache/calcite/pull/1515#discussion_r336207774
##########
File path:
core/src/main/java/org/apache/calcite/rel/rules/SubQueryRemoveRule.java
##########
@@ -235,9 +235,9 @@ private RexNode rewriteSome(RexSubQuery e,
Set<CorrelationId> variablesSet,
// end as v
// from emp as e
// left outer join (
- // select max(deptno) as m, count(*) as c, count(deptno) as d,
+ // select name, max(deptno) as m, count(*) as c, count(deptno) as d,
// "alwaysTrue" as indicator
- // group by name from emp) as q on e.name = q.name
+ // from emp group by name) as q on e.name = q.name
Review comment:
I know what you're saying, @danny0405 - projecting `name` it isn't necessary
in algebra because `Aggregate` always projects its group keys.
But it is necessary in SQL. The SQL as it stands is invalid, and fixing the
SQL might help some people.
We recently had a discussion on dev@ about "small" PRs, and agreed to accept
them. No JIRA case needed, the commit comment should make clear that it is a
"small" change, no need to append the contributor's name, and the release
manager should strip out such commits from the release notes.
I'm going to merge this one.
----------------------------------------------------------------
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