thswlsqls commented on PR #40071: URL: https://github.com/apache/shardingsphere/pull/40071#issuecomment-6354849665
@terrymanu Thanks for the review. Both reproduce. The second is a regression from my last commit: returning a single context drops the same-scope ambiguity, and it affects EXISTS too. The first, like the shadowing case from your first review, is not specific to quantified subqueries: on current master, an EXISTS nested in an EXISTS already binds `x.status` to the farther `t_order x` and reports `x.user_id` as ambiguous, because `ExpressionSegmentBinder` merges every enclosing scope into one flat `outerTableBinderContexts` map with no scope boundary. Fixing both needs scope-aware outer resolution for EXISTS, scalar, and quantified subqueries alike. Would you like that in this PR, or should I narrow this PR to propagating the outer scope (same as EXISTS today) and open a separate issue for scope-aware resolution? I'll go with whichever you prefer. -- 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]
