-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-24121][SQL] Add API for handling expression code generation #21193
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
Closed
Changes from 17 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
1df9943
Add API for handling expression code generation.
viirya 5fe425c
Add new abstraction for expression codegen.
viirya 00bef6b
Add basic tests.
viirya 5d9c454
Merge remote-tracking branch 'upstream/master' into SPARK-24121
viirya 162deb2
Deal merging conflict.
viirya d138ee0
Address comments and add more tests.
viirya ee9a4c0
Address comments.
viirya e7cfa28
Remove JavaCode.block. We should always use code string interpolator …
viirya 5945c15
We should not implicitly convert code block to string. Otherwise we m…
viirya 2b30654
Address comment and trim expected code string.
viirya aff411b
Remove unused import.
viirya 53b329a
Address comments.
viirya 72faac3
Address some comments.
viirya ffbf4ab
Merge remote-tracking branch 'upstream/master' into SPARK-24121
viirya d040676
Use code block for newly merged codegen.
viirya c378ce2
Use Set as method exprValues method returning type.
viirya 2ca9741
Address comments.
viirya d91f111
Merge remote-tracking branch 'upstream/master' into SPARK-24121
viirya 4b49e8a
Merge remote-tracking branch 'upstream/master' into SPARK-24121
viirya 96c594a
Use Java call style and use JavaCode instead of Any.
viirya 00cc564
Merge remote-tracking branch 'upstream/master' into SPARK-24121
viirya 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
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
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.
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.
I might miss something, but don't we need to pass
ExprValueorBlockand returnBlockfromcastCode()to keep track of code snippets and inputs?We can say the same thing anywhere we create a smaller code snippet using
sinterpolation.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.
We can use
ExprValueandBlockaround everywhere inCasthere (I did in a local branch), just it increases some code diff, so I'm not sure if we want it be here or as a follow-up if it's easier for review.Inputs to
Castshould be onlyeval.valueandeval.isNullas it's only child expression toCast. We add generated codes here but they are not actually input expressions toCast. So for now I manually leteval.valueandeval.isNullbe tracked.