generated from amazon-archives/__template_Custom
-
Couldn't load subscription status.
- Fork 176
Support project expression pushdown with derived field script #4288
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
songkant-aws
wants to merge
50
commits into
opensearch-project:main
from
songkant-aws:project-pushdown
Closed
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
e1609c7
Support script project pushdown
LantaoJin 46e27ff
Merge remote-tracking branch 'upstream/main' into issues/3387
LantaoJin e563b5b
Fix IT
LantaoJin efef12c
Merge branch 'main' into pr/issues/3387
songkant-aws f197c4d
Resolve compile issue and use derived field script
songkant-aws c693625
Merge branch 'main' into project-pushdown
songkant-aws d6061e9
Fix derived field pushdown with correct project names and setup
songkant-aws 65973d8
Fix pushed derived field name key conflicts with index fields issue
songkant-aws bb9cb2c
Merge branch 'main' into project-pushdown
songkant-aws 688b5c9
Exclude some cases that are not supported
songkant-aws 2794e1c
Merge branch 'main' into project-pushdown
songkant-aws 34aa546
Exclude agg pushdown case after script project pushdown
songkant-aws 5f1b61d
Refactor the code a bit
songkant-aws 85f5b3e
Fix UT
songkant-aws c59f683
Merge branch 'main' into project-pushdown
songkant-aws 80b5888
Revert some unnecessary change
songkant-aws 33e2fb7
Merge branch 'main' into project-pushdown
songkant-aws 9389e43
Merge pushDownProject and pushDownScriptPorject methods
songkant-aws ab7a5ce
Fix some bugs and correct explained plans
songkant-aws 89837e1
Fix sort by simple expression after script project pushdown
songkant-aws e511b0b
Fix some logic for derived_existing fields
songkant-aws 81739cb
Remove some unused methods
songkant-aws 3642f10
Merge branch 'main' into project-pushdown
songkant-aws 8056146
Fix spotless check
songkant-aws 8f0af84
Add more test cases
songkant-aws c7e154b
Minor fixes to save script length
songkant-aws 5e9ec59
Fix no pushdown IT
songkant-aws ec6ca9f
Merge branch 'main' into project-pushdown
songkant-aws b4815b4
Enable valid UDT type in script project pushdown
songkant-aws 29882e9
Merge branch 'main' into project-pushdown
songkant-aws 01e38a2
Merge branch 'main' into project-pushdown
songkant-aws 9bc1fc3
Correct explained plans after merge
songkant-aws 62827f4
Fix spotless check
songkant-aws 68cd3c7
Support float type project pushdown
songkant-aws 8210764
Fix expected result of testDivide
songkant-aws 037476a
Merge branch 'main' into project-pushdown
songkant-aws 1da8670
Address comments and relax pushdown row count factor
songkant-aws 3f046f3
Fix explain cost test
songkant-aws 3e501b2
Merge branch 'main' into project-pushdown
songkant-aws 72d4481
Add more test cases
songkant-aws e36d38b
Transform test json files to yaml files
songkant-aws 70afed0
Minor change to instantiate single instance of remap index visitor
songkant-aws bc91275
Add an IT to check query correctness
songkant-aws 25e61d8
Fix spotless check
songkant-aws 7b0032f
Merge branch 'main' into project-pushdown
songkant-aws da07146
Minor change of remapping expression in pushdownProject
songkant-aws e1dd9e7
Resolve conflicts after merge
songkant-aws 2010ea8
Merge branch 'main' into project-pushdown
songkant-aws dd22241
Fix IT after merge
songkant-aws 988a465
Add penalty cost if derived field script exceeds cap
songkant-aws 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
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 |
|---|---|---|
|
|
@@ -647,6 +647,26 @@ public void testFieldsWithManyFields() throws IOException { | |
| schema("employer", "string")); | ||
| } | ||
|
|
||
| @Test | ||
| public void testFieldsWithNameConflictDerivedFieldPushdown() throws IOException { | ||
| // All the ascending top 5 original age field values are 20. After the derived field | ||
| // calculation, they are changed to 22. This query should give 5 rows of correct fields. | ||
| String ppl = | ||
| String.format( | ||
| "source=%s | sort age | head 5 | eval age = age + 2 | where age = 22 | fields email," | ||
| + " age", | ||
| TEST_INDEX_ACCOUNT); | ||
| JSONObject result = executeQuery(ppl); | ||
| verifySchema(result, schema("email", "string"), schema("age", "bigint")); | ||
| verifyDataRows( | ||
| result, | ||
| rows("[email protected]", 22), | ||
| rows("[email protected]", 22), | ||
| rows("[email protected]", 22), | ||
| rows("[email protected]", 22), | ||
| rows("[email protected]", 22)); | ||
| } | ||
|
|
||
| @Test | ||
| public void testTableWithManyFields() throws IOException { | ||
| JSONObject result = | ||
|
|
||
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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems in the plan the new age field becomes
age0. I'm curious where is it set back to nameageThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems the column names in our final results are derived from the original plan(i.e. logical plan), so the final plan(i.e. physical plan) is allowed to produce a different row type as long as the types can match.