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
apoorvedave1 wants to merge 2 commits intomicrosoft:masterfrom
Open
[Gold Standard] Enable stats with spark 2.4 with a sample query#429apoorvedave1 wants to merge 2 commits intomicrosoft:masterfrom
apoorvedave1 wants to merge 2 commits intomicrosoft:masterfrom
Conversation
apoorvedave1
commented
Apr 22, 2021
| == 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.
apoorvedave1
commented
Apr 22, 2021
| """.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
apoorvedave1
commented
Apr 22, 2021
src/test/scala/com/microsoft/hyperspace/goldstandard/TPCDSTableStats.scala
Outdated
Show resolved
Hide resolved
sezruby
reviewed
Apr 26, 2021
Collaborator
sezruby
left a comment
There was a problem hiding this comment.
LGTM, thanks @apoorvedave1!
| )) | ||
| ) | ||
| // scalastyle:on line.size.limit | ||
| } No newline at end of file |
apoorvedave1
commented
Apr 26, 2021
src/test/scala/com/microsoft/hyperspace/goldstandard/TPCDSTableStats.scala
Outdated
Show resolved
Hide resolved
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