[SPARK-37019][SQL] Add codegen support to array transform#34294
[SPARK-37019][SQL] Add codegen support to array transform#34294Kimahriman wants to merge 2 commits intoapache:masterfrom
Conversation
| result | ||
| } | ||
|
|
||
| override def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = { |
There was a problem hiding this comment.
Some of this can probably be abstracted out into the parent traits, but I figured that will be easier to do when implementing a second function
|
Can one of the admins verify this patch? |
|
I have array filter working already too, just waiting for some feedback on this. |
|
Codegen example for |
|
Already ran into an issue testing this out in a real use case where making it non-splittable caused a function to grow to big and revert back to interpreted, so I changed to just always use the atomic variable reference to read the value so it can be splittable. New sample codegen: |
|
ping @viirya @HyukjinKwon since you two usually look at my PRs or might know the right other people to ping for thoughts :) |
|
Closing in favor of #34558 |
What changes were proposed in this pull request?
This PR adds codegen support to ArrayTransform. This is my first time playing around with codegen, so definitely looking for any feedback. I ran into several issues along the way which you'll see in some checks I had to add. Specifically:
Questions I have:
Why are the changes needed?
To improve performance of transform operations, letting the children be codegen'd and participate in WholeStageCodegen
Does this PR introduce any user-facing change?
No, only performance improvements.
How was this patch tested?
Existing unit tests, let me know if there's other codegen-specific unit tests I should add.