You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "jonasHanhan (via GitHub)" <gi...@apache.org> on 2026/01/28 07:21:01 UTC
[PR] Fix correlated subquery in HAVING cannot reference outer query column [shardingsphere]
jonasHanhan opened a new pull request, #37872:
URL: https://github.com/apache/shardingsphere/pull/37872
Fixes #37431.
Changes proposed in this pull request:
- Merge FROM `tableBinderContexts` into `outerTableBinderContexts` before binding HAVING clause expressions
- This allows correlated subqueries in HAVING to resolve outer query table aliases (e.g., `ref_0.c13`)
- Aligns HAVING binding behavior with WHERE binding path
- Add unit test for `HavingSegmentBinder`
- Add integration tests for correlated subqueries in HAVING clause (PostgreSQL, MySQL, openGauss)
---
Before committing this PR, I'm sure that I have checked the following options:
- [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [x] I have self-reviewed the commit code.
- [x] I have (or in comment I request) added corresponding labels for the pull request.
- [x] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [x] I have added corresponding unit tests for my changes.
- [ ] I have updated the Release Notes of the current development version.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix correlated subquery in HAVING cannot reference outer query column [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu merged PR #37872:
URL: https://github.com/apache/shardingsphere/pull/37872
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org