-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-29743][SQL] sample should set needCopyResult to true if its child is #26387
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
Conversation
|
|
||
| override def needCopyResult: Boolean = withReplacement | ||
| override def needCopyResult: Boolean = { | ||
| child.asInstanceOf[CodegenSupport].needCopyResult || withReplacement |
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.
Good catch!
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.
Oh, yes. Indeed.
|
This bug fix needs to be backported to all the active versions. |
dongjoon-hyun
left a comment
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.
+1, LGTM. Thank you so much, @cloud-fan !
|
I tested the new UT locally, but this PR might break some other |
|
Test build #113212 has finished for PR 26387 at commit
|
|
Merged to master/2.4. Thank you, @cloud-fan , @viirya , @gatorsmile . |
…ild is `SampleExec` has a bug that it sets `needCopyResult` to false as long as the `withReplacement` parameter is false. This causes problems if its child needs to copy the result, e.g. a join. to fix a correctness issue Yes, the result will be corrected. a new test Closes #26387 from cloud-fan/sample-bug. Authored-by: Wenchen Fan <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]> (cherry picked from commit 326b789) Signed-off-by: Dongjoon Hyun <[email protected]>
|
oh.. I'm late. LGTM. Anyway, good catch! |
What changes were proposed in this pull request?
SampleExechas a bug that it setsneedCopyResultto false as long as thewithReplacementparameter is false. This causes problems if its child needs to copy the result, e.g. a join.Why are the changes needed?
to fix a correctness issue
Does this PR introduce any user-facing change?
Yes, the result will be corrected.
How was this patch tested?
a new test