-
Notifications
You must be signed in to change notification settings - Fork 214
Mvexpand feature #4944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
srikanthpadakanti
wants to merge
88
commits into
opensearch-project:main
from
srikanthpadakanti:main
Closed
Mvexpand feature #4944
Changes from 52 commits
Commits
Show all changes
88 commits
Select commit
Hold shift + click to select a range
8362fc2
Initial checkpoint - following calcite way and commented legacy way
srikanthpadakanti 384ba15
Removed the build.gradle dependency opensearch-common
srikanthpadakanti 7f382f9
Ready to submit this PR
srikanthpadakanti 44c8124
Ready to submit this PR
srikanthpadakanti 3cad64e
Ready to submit this PR
srikanthpadakanti 8e4a2c5
Add mvexpand.rst
srikanthpadakanti 474617d
Add Tests
srikanthpadakanti d502b03
Add the mvexpand.rst to the index.rst
srikanthpadakanti c62defe
Remove the unwanted code
srikanthpadakanti a3799b2
Fix the failing test
srikanthpadakanti d90be9f
Address the PR comments and fix the tests accordingly
srikanthpadakanti da16288
Address the PR comments and fix the tests accordingly
srikanthpadakanti 1301e06
Address the PR comments and fix the tests accordingly
srikanthpadakanti beb31de
Add comment lines for buildUnnestForLeft
srikanthpadakanti 627ef8f
Fix the mvexpand.rst
srikanthpadakanti 58facf8
Fix the failing test
srikanthpadakanti 63cdbf7
Fix the failing test
srikanthpadakanti bdc3aa1
Fix the failing test
srikanthpadakanti fc8e345
Fix the failing test
srikanthpadakanti c830356
Address the PR comments
srikanthpadakanti e9b6f27
Address the PR comments
srikanthpadakanti fa9436e
Address the PR comments
srikanthpadakanti ea091d2
Address the PR comments
srikanthpadakanti 4d9b24d
Address the PR comments
srikanthpadakanti b9d3164
Address the issue as the happy path scenario was not working the way …
srikanthpadakanti 26a59a4
MvExpand as its own implementation - not aliasing
srikanthpadakanti 43c806e
Refactoring EXPAND and MVEXPAND
srikanthpadakanti a07dff2
Refactor EXPAND and MVEXPAND and fix its unittest
srikanthpadakanti 7be7473
Convert mvexpand.rst examples to doctest
srikanthpadakanti 2c0ea2c
metadata.rst was missing the mvexpand_logs entry
srikanthpadakanti 8749289
Address the PR comments for IT and visitMvExpand
srikanthpadakanti 9508874
Merge branch 'main' into main
srikanthpadakanti 08b56ee
Add test for mvdedup function with duplicates
srikanthpadakanti 3ae2c73
Merge branch 'main' into main
srikanthpadakanti bed2084
Update core/src/main/java/org/opensearch/sql/calcite/CalciteRelNodeVi…
srikanthpadakanti 5e616ff
Update core/src/main/java/org/opensearch/sql/calcite/CalciteRelNodeVi…
srikanthpadakanti 709704c
Address the PR comments
srikanthpadakanti c45fa05
Address the PR comments
srikanthpadakanti 4f3435e
change the limit behavior from global to perDocument
srikanthpadakanti a0b2c8c
Merge branch 'opensearch-project:main' into main
srikanthpadakanti 47779e1
Merge branch 'opensearch-project:main' into main
srikanthpadakanti bf6b924
Fix the CI issues
srikanthpadakanti 9aec421
Merge branch 'main' into main
srikanthpadakanti bf87312
Update the index.rst
srikanthpadakanti c9e2767
spotlessapply
srikanthpadakanti 2591a6c
Merge branch 'mywork-backup'
srikanthpadakanti 125cf3b
spotlessapply
srikanthpadakanti 00c990f
address merge issue
srikanthpadakanti 44814ab
address merge issue
srikanthpadakanti f9dd692
change rst to md
srikanthpadakanti 69d6a5a
Merge branch 'opensearch-project:main' into main
srikanthpadakanti 2464675
change rst to md
srikanthpadakanti 0f86c52
delete unnecessary test
srikanthpadakanti 32d3867
Merge branch 'main' into main
srikanthpadakanti 07509ae
remove index.rst and add mvexpand entry in index.md
srikanthpadakanti 34db739
spotless apply
srikanthpadakanti 602358e
merge issues.
srikanthpadakanti b1f2e59
Merge remote-tracking branch 'upstream/main'
srikanthpadakanti 2adbf6f
Address and resolve the PR comments from Dec 30th 2025
srikanthpadakanti 559165f
Address and resolve the PR comments from Dec 30th 2025
srikanthpadakanti f7d942d
Address and resolve the PR comments from Dec 30th 2025
srikanthpadakanti 6ca94e2
Address and resolve the PR comments from Dec 30th 2025
srikanthpadakanti e747edb
Address and resolve the PR comments from Dec 30th 2025
srikanthpadakanti 587ccb2
Address and resolve the PR comments from Dec 30th 2025
srikanthpadakanti 600637f
Address and resolve the PR comments from Dec 30th 2025
srikanthpadakanti 79c9b9d
Merge branch 'opensearch-project:main' into main
srikanthpadakanti 19c2065
undo the overriden test
srikanthpadakanti 16dbaad
Add asserts to unittests
srikanthpadakanti 1d0a56e
Add asserts to unittests
srikanthpadakanti d3651f8
Add asserts to unittests
srikanthpadakanti 5efd096
Address the PR comment to related to IT to use single one and test di…
srikanthpadakanti e067b46
Address the PR comment to verify the output shape of mvexpand output
srikanthpadakanti 514a7dc
Address the PR comment for mvexpand.md example
srikanthpadakanti 9e8ea2c
Address the PR comment for mvexpand.md example
srikanthpadakanti 00f440b
Address the PR comment for mvexpand to throw special Exception class …
srikanthpadakanti 840a454
spotlessapply
srikanthpadakanti 50031ce
spotlessapply
srikanthpadakanti 1b6674f
Merge branch 'opensearch-project:main' into main
srikanthpadakanti e988320
Fix the mvexpand.md review comments
srikanthpadakanti c743933
Address the comments related to CalciteRelNodeVisitor
srikanthpadakanti 658c1e1
Address the comments related to CalciteRelNodeVisitor
srikanthpadakanti 98d9a53
Merge upstream/main into main
srikanthpadakanti e3239ae
Apply mvexpand changes after upstream merge
srikanthpadakanti c3d0f4d
Fix the mvexpand doctest
srikanthpadakanti c72a752
Force run CI pipeline
srikanthpadakanti a519507
change the crosscluster IT to proper location
srikanthpadakanti ca7acbb
Merge branch 'opensearch-project:main' into main
srikanthpadakanti 3fed3c3
Merge upstream to my branch
srikanthpadakanti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
46 changes: 46 additions & 0 deletions
46
core/src/main/java/org/opensearch/sql/ast/tree/MvExpand.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| /* | ||
| * Copyright OpenSearch Contributors | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package org.opensearch.sql.ast.tree; | ||
|
|
||
| import com.google.common.collect.ImmutableList; | ||
| import java.util.List; | ||
| import javax.annotation.Nullable; | ||
| import lombok.EqualsAndHashCode; | ||
| import lombok.Getter; | ||
| import lombok.ToString; | ||
| import org.opensearch.sql.ast.AbstractNodeVisitor; | ||
| import org.opensearch.sql.ast.expression.Field; | ||
|
|
||
| /** AST node representing an {@code mvexpand <field> [limit N]} operation. */ | ||
|
srikanthpadakanti marked this conversation as resolved.
Outdated
|
||
| @ToString | ||
| @EqualsAndHashCode(callSuper = false) | ||
| public class MvExpand extends UnresolvedPlan { | ||
|
|
||
| private UnresolvedPlan child; | ||
| @Getter private final Field field; | ||
| @Getter @Nullable private final Integer limit; | ||
|
|
||
| public MvExpand(Field field, @Nullable Integer limit) { | ||
| this.field = field; | ||
| this.limit = limit; | ||
| } | ||
|
|
||
| @Override | ||
| public MvExpand attach(UnresolvedPlan child) { | ||
| this.child = child; | ||
| return this; | ||
| } | ||
|
|
||
| @Override | ||
| public List<UnresolvedPlan> getChild() { | ||
| return this.child == null ? ImmutableList.of() : ImmutableList.of(this.child); | ||
| } | ||
|
|
||
| @Override | ||
| public <T, C> T accept(AbstractNodeVisitor<T, C> nodeVisitor, C context) { | ||
| return nodeVisitor.visitMvExpand(this, context); | ||
| } | ||
| } | ||
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.