[Calcite engine] Support nested field#3476
Merged
LantaoJin merged 4 commits intoopensearch-project:mainfrom Mar 26, 2025
Merged
[Calcite engine] Support nested field#3476LantaoJin merged 4 commits intoopensearch-project:mainfrom
LantaoJin merged 4 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Heng Qian <qianheng@amazon.com>
…calcite-engine-nested
Signed-off-by: Heng Qian <qianheng@amazon.com>
LantaoJin
reviewed
Mar 25, 2025
| return context.relBuilder.peek(); | ||
| } | ||
|
|
||
| /** See logic in {@link org.opensearch.sql.analysis.symbol.SymbolTable#lookupAllFields} */ |
Member
There was a problem hiding this comment.
there is a bug in V2. could you check is it existing in this pr? #3477
Collaborator
Author
There was a problem hiding this comment.
Has a new discovery for that issue: #3477 (comment)
Member
There was a problem hiding this comment.
Thanks for correcting. Anyway, my point is for the field name with dot. But seems the field with dot in OpenSearch are all treated as nested type.
Collaborator
There was a problem hiding this comment.
Add comments, we should handle this case in future. #3477 (comment)
LantaoJin
previously approved these changes
Mar 25, 2025
penghuo
reviewed
Mar 25, 2025
| verifySchema(result, schema("count()", "integer"), schema("city.name", "string")); | ||
| verifySchema( | ||
| result, | ||
| schema("count()", isCalciteEnabled() ? "long" : "integer"), |
Collaborator
There was a problem hiding this comment.
merge from main, it should be bigint and int now.
| return context.relBuilder.peek(); | ||
| } | ||
|
|
||
| /** See logic in {@link org.opensearch.sql.analysis.symbol.SymbolTable#lookupAllFields} */ |
Collaborator
There was a problem hiding this comment.
Add comments, we should handle this case in future. #3477 (comment)
…calcite-engine-nested # Conflicts: # integ-test/src/test/java/org/opensearch/sql/ppl/ObjectFieldOperateIT.java
penghuo
approved these changes
Mar 26, 2025
penghuo
pushed a commit
that referenced
this pull request
Jun 16, 2025
* [Calcite engine] Support nested field Signed-off-by: Heng Qian <qianheng@amazon.com> * Fix merging Signed-off-by: Heng Qian <qianheng@amazon.com> --------- Signed-off-by: Heng Qian <qianheng@amazon.com> Signed-off-by: xinyual <xinyual@amazon.com>
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.
Description
Support nested field
Implementation options
option1(This PR): For opensearch index, since we already have nested fields flattened and accessible in the mapping information, we just have to fill the flatten nested fields with its related value, then it could support access to the nested fields as well as get the correct value.
option2: [FEATURE][Calcite Engine] Support access to nested fields after command
FIELDS#3459Related Issues
Resolves #3452
Check List
--signoff.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.