Extend V2 SQL parser with IN/EXISTS subqueries for unified query path#5448
Extend V2 SQL parser with IN/EXISTS subqueries for unified query path#5448dai-chen wants to merge 1 commit into
IN/EXISTS subqueries for unified query path#5448Conversation
PR Reviewer Guide 🔍(Review updated until commit bd3074d)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to bd3074d Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 62a146b
Suggestions up to commit cc181cd
|
cc181cd to
62a146b
Compare
|
Persistent review updated to latest commit 62a146b |
Add grammar rules (inSubqueryPredicate, existsSubqueryExpressionAtom) and wire them through ExtendedAstExpressionBuilder to produce InSubquery and ExistsSubquery AST nodes for the Calcite-based unified query path. Base AstExpressionBuilder throws SyntaxCheckException to preserve legacy engine fallback. AstBuilder now uses createExpressionBuilder() factory method to allow subclass customization. Also add Alias handling in CalciteRelNodeVisitor.expandProjectFields required for any non-SELECT * query in the unified path. Signed-off-by: Chen Dai <daichen@amazon.com>
62a146b to
bd3074d
Compare
|
Persistent review updated to latest commit bd3074d |
Description
Extend the V2 SQL ANTLR grammar and add
ExtendedAstExpressionBuilderto supportINandEXISTSsubqueries in the unified Calcite-based query path. The baseAstExpressionBuildercontinues to throwSyntaxCheckExceptionfor these statements, preserving the legacy engine fallback in production.Notes
CalciteRelNodeVisitorhere to unblock tests using SELECT with specific fieldsEXISTSsubquery only works for PartiQL nested fields in the legacy engine, thus no IT added herePlanned PRs
JOINfor unified query path #5446CalciteRelNodeVisitorissues identified during V2 AST integrationRelated Issues
Part of #5248
Check List
--signoffor-s.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.