-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-22848][SQL] Eliminate mutable state from Stack #20035
Conversation
s""" | ||
|$code | ||
|$wrapperClass<InternalRow> ${ev.value} = $wrappedArray; | ||
""".stripMargin, isNull = "false") |
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.
This change does not use inline = true
at ctx.addMutableState
for correct code generation.
This PR comes from this discussion. |
Test build #85189 has finished for PR 20035 at commit
|
ev.copy(code = code, isNull = "false") | ||
ev.copy(code = | ||
s""" | ||
|InternalRow[] $rowData = new InternalRow[$numRows]; |
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.
this creates a large array every time, and I don't think we have data copy issues for generator expressions...
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 see. I did not imagine that numRows
is large.
I will revert the code for rowData
.
Test build #85191 has finished for PR 20035 at commit
|
Test build #85194 has finished for PR 20035 at commit
|
Test build #85198 has finished for PR 20035 at commit
|
Jenkins, retest this please |
LGTM |
Test build #85223 has finished for PR 20035 at commit
|
LGTM |
Jenkins, retest this please |
I think the test failure is not related to this change, but the ongoing work to upgrade pyarrow. |
yea it's failing globally, I'm merging this PR, thanks! |
Test build #85237 has finished for PR 20035 at commit
|
I ran the test (HDFSMetadataLogSuite) locally. It should be fine as it passes. |
What changes were proposed in this pull request?
This PR eliminates mutable states from the generated code for
Stack
.How was this patch tested?
Existing test suites