-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-34031][SQL] Union operator missing rowCount when CBO enabled #31068
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 visitUnion(p: Union): Statistics = { | ||
| val stats = p.children.map(_.stats) | ||
| val rowCount = if (stats.exists(_.rowCount.isEmpty)) { | ||
| None | ||
| } else { | ||
| Some(stats.map(_.rowCount.get).sum) | ||
| } | ||
| Statistics(sizeInBytes = stats.map(_.sizeInBytes).sum, rowCount = rowCount) | ||
| } |
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.
Same logic, just add row count:
Lines 148 to 150 in 6c5ba81
| override def visitUnion(p: Union): Statistics = { | |
| Statistics(sizeInBytes = p.children.map(_.stats.sizeInBytes).sum) | |
| } |
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Test build #133746 has finished for PR 31068 at commit
|
|
Seems needing to update query plan files. |
|
Looks fine except for the @viirya comment. |
|
Kubernetes integration test starting |
|
@wangyum, sorry but can you push an empty commit to retrigger the GA build? I would like to keep the result of the test failure because it looks like a flaky test. |
|
Kubernetes integration test status success |
|
The flaky tests are known and being fixed at |
|
Merged to master. |
|
Test build #133770 has finished for PR 31068 at commit
|
What changes were proposed in this pull request?
This pr add row count to
Unionoperator when CBO enabled.Before this pr:
After this pr:
Why are the changes needed?
Improve query performance,
JoinEstimation.estimateInnerOuterJoinneed the row count.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Unit test.