This repository was archived by the owner on Jun 14, 2024. It is now read-only.
[Gold Standard] Enable stats with spark 2.4 with a sample query - #429
Open
Apoorve Dave (apoorvedave1) wants to merge 2 commits into
Open
[Gold Standard] Enable stats with spark 2.4 with a sample query#429Apoorve Dave (apoorvedave1) wants to merge 2 commits into
Apoorve Dave (apoorvedave1) wants to merge 2 commits into
Conversation
| == Physical Plan == | ||
| CollectLimit 100 | ||
| +- *(5) Project [cs_bill_customer_sk#1, ss_customer_sk#2] | ||
| +- *(5) SortMergeJoin [cs_sold_date_sk#3], [ss_sold_date_sk#4], Inner |
Contributor
Author
There was a problem hiding this comment.
Note: SortMergeJoin is used here because stats are enabled.
| """.stripMargin) | ||
| } | ||
|
|
||
| private val originalCBCEnabled = conf.cboEnabled |
Contributor
Author
There was a problem hiding this comment.
all changes below this line onward are directly picked from spark codebase. Refer https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/TPCDSBase.scala#L609
Apoorve Dave (apoorvedave1)
requested review from
Chungmin Lee (clee704),
Terry Kim (imback82),
EJ Song (sezruby) and
Gurleen Singh (thugsatbay)
April 22, 2021 20:12
EJ Song (sezruby)
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thanks Apoorve Dave (@apoorvedave1)!
| )) | ||
| ) | ||
| // scalastyle:on line.size.limit | ||
| } No newline at end of file |
Andrei Ionescu (andrei-ionescu)
approved these changes
Jun 9, 2021
Andrei Ionescu (andrei-ionescu)
left a comment
Contributor
There was a problem hiding this comment.
LGTM 🚀
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What is the context for this pull request?
As discussed previously, this PR enables stats on spark's query plans
What changes were proposed in this pull request?
Enable stats in native spark's gold standard test cases. The stats are picked directly from apache spark 3.0+ codebase from this file https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/TPCDSTableStats.scala
This ensures that for joining large tables, Broadcast join is replaced by SortMergeJoin.
Does this PR introduce any user-facing change?
No
How was this patch tested?
unit test