[Enhancement] Add error handling for known limitation of sql JOIN#4344
Merged
Swiddis merged 15 commits intoopensearch-project:mainfrom Oct 1, 2025
Merged
Conversation
JOINJOIN
Swiddis
reviewed
Sep 23, 2025
Collaborator
Swiddis
left a comment
There was a problem hiding this comment.
A few suggestions -- I think this could be designed better if changing JoinSelect doesn't cause cascading breakage, otherwise this approach is fine.
legacy/src/main/java/org/opensearch/sql/legacy/parser/SqlParser.java
Outdated
Show resolved
Hide resolved
legacy/src/main/java/org/opensearch/sql/legacy/parser/SqlParser.java
Outdated
Show resolved
Hide resolved
legacy/src/test/java/org/opensearch/sql/legacy/unittest/parser/SqlParserTest.java
Outdated
Show resolved
Hide resolved
legacy/src/test/java/org/opensearch/sql/legacy/unittest/parser/SqlParserTest.java
Outdated
Show resolved
Hide resolved
legacy/src/test/java/org/opensearch/sql/legacy/unittest/parser/SqlParserTest.java
Outdated
Show resolved
Hide resolved
Swiddis
previously approved these changes
Sep 25, 2025
Swiddis
previously approved these changes
Sep 25, 2025
dai-chen
reviewed
Sep 25, 2025
dai-chen
reviewed
Sep 29, 2025
legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitor.java
Outdated
Show resolved
Hide resolved
dai-chen
reviewed
Sep 30, 2025
Collaborator
Author
|
Added the new tests in |
dai-chen
reviewed
Sep 30, 2025
Comment on lines
295
to
305
| if (ctx.tableSource().size() > 1) { | ||
| return true; | ||
| } | ||
|
|
||
| for (int i = 0; i < ctx.tableSource().size(); i++) { | ||
| Boolean hasJoinInTableSource = visit(ctx.tableSource(i)); | ||
| if (hasJoinInTableSource != null && hasJoinInTableSource) { | ||
| return true; | ||
| } | ||
| } | ||
| return false; |
Collaborator
There was a problem hiding this comment.
what's this trying to check?
Collaborator
Author
There was a problem hiding this comment.
transferring some offline communication with @dai-chen here: we should limit the scope of this for only check the explicit join only - so removed this section.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
9240c00 to
1634610
Compare
dai-chen
approved these changes
Oct 1, 2025
Swiddis
approved these changes
Oct 1, 2025
8 tasks
Collaborator
Author
|
#4378 is failing at the same |
Collaborator
|
Failures exist in main and are only with recently added tests, think this is ok to merge |
asifabashar
added a commit
to asifabashar/sql
that referenced
this pull request
Oct 10, 2025
* main-apple: (218 commits) Add ignorePrometheus Flag for integTest and docTest (opensearch-project#4442) Create fab-radar.yml PPL `fillnull` command enhancement (opensearch-project#4421) reverting to _doc + _id (opensearch-project#4435) Support `multisearch` command in calcite (opensearch-project#4332) Add 3.3 release notes (opensearch-project#4422) (opensearch-project#4423) [SQL/PPL] Fix the `count(*)` and `dc(field)` to be capped at MAX_INTEGER opensearch-project#4416 (opensearch-project#4418) Change the default search sort tiebreaker to `_shard_doc` for PIT search (opensearch-project#4378) [Enhancement] Add error handling for known limitation of sql `JOIN` (opensearch-project#4344) Bugfix: SQL type mapping for legacy JDBC output (opensearch-project#3613) Version bump: 3.3 (opensearch-project#4417) Add max/min eval functions (opensearch-project#4333) Support time modifiers in search command (opensearch-project#4224) Fix numbered token bug and make it optional output in patterns command (opensearch-project#4402) refactor span (opensearch-project#4334) Move release notes categories (opensearch-project#3818) [Doc] Enable doctest with Calcite (opensearch-project#4379) Mod function should return decimal instead of float when handle the operands are decimal literal (opensearch-project#4407) Scale of decimal literal should always be positive in Calcite (opensearch-project#4401) Enable Calcite by default and implicit fallback the unsupported commands (opensearch-project#4372) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Jialiang Liang jiallian@amazon.com
Description
Better error handling for known limitation of sql JOIN
example:
Related Issues
JOINquery limitation #4058Check 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.