thswlsqls opened a new pull request, #40071:
URL: https://github.com/apache/shardingsphere/pull/40071

   Fixes #40067.
   
   Changes proposed in this pull request:
     - `ExpressionSegmentBinder` now merges `outerTableBinderContexts` with 
`tableBinderContexts` before binding a `QuantifySubqueryExpression`, so an 
`ANY`/`ALL`/`SOME` subquery nested inside another subquery can resolve aliases 
from every enclosing level instead of failing with `Unknown column`.
     - This mirrors the existing `ExistsSubqueryExpression` and 
`SubqueryExpressionSegment` branches; the same scope loss was fixed for 
`NotExpressionBinder` in #36135.
     - Added 
`ExpressionSegmentBinderTest#assertBindQuantifySubqueryWithOuterTableContext`, 
which checks that the contexts passed to `SubquerySegmentBinder` include both 
the outer and the current tables. It fails without the fix.
   
   AI assistance: Claude Code was used to draft the change and its unit test in 
`infra/binder/core` (`ExpressionSegmentBinder`, `ExpressionSegmentBinderTest`) 
and the `RELEASE-NOTES.md` entry. I reviewed, verified, and take responsibility 
for every line submitted.
   
   ---
   
   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.
   - [ ] I have (or in comment I request) added corresponding labels for the 
pull request. (I don't have permission to add labels.)
   - [ ] I have passed maven check locally : `./mvnw clean install -B -T1C 
-Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`. (Not run for the whole 
repository; I ran `spotless:apply`, `checkstyle:check`, and `apache-rat:check` 
with `-Pcheck -pl infra/binder/core`, plus `./mvnw install -pl 
infra/binder/core -am -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`, all 
passing. E2E tests were not run.)
   - [ ] I have made corresponding changes to the documentation. (No 
user-facing documentation is affected.)
   - [x] I have added corresponding unit tests for my changes.
   - [x] I have updated the Release Notes of the current development version. 
For more details, see [Update Release 
Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
   - [x] I have disclosed the tool and affected files or scope for any material 
AI assistance, as required by the [AI-assisted contribution policy].
   
   [AI-assisted contribution policy]: 
https://github.com/apache/shardingsphere/blob/master/AI_POLICY.md
   
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to