-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-24850][SQL] fix str representation of CachedRDDBuilder #21805
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
Changes from 2 commits
2a49fe4
9ccfc4e
cf2eae2
45685e4
de3f63e
2a21c80
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -206,4 +206,19 @@ class DatasetCacheSuite extends QueryTest with SharedSQLContext with TimeLimits | |
| // first time use, load cache | ||
| checkDataset(df5, Row(10)) | ||
| } | ||
|
|
||
| test("SPARK-24850 InMemoryRelation string representation does not include cached plan") { | ||
| val dummyQueryExecution = spark.range(0, 1).toDF().queryExecution | ||
| val inMemoryRelation = InMemoryRelation( | ||
| true, | ||
| 1000, | ||
| StorageLevel.MEMORY_ONLY, | ||
| dummyQueryExecution.sparkPlan, | ||
| Some("test-relation"), | ||
| dummyQueryExecution.logical) | ||
|
|
||
| assert(!inMemoryRelation.simpleString.contains(dummyQueryExecution.sparkPlan.toString)) | ||
| assert(inMemoryRelation.simpleString.contains( | ||
| "CachedRDDBuilder(true, 1000, StorageLevel(memory, deserialized, 1 replicas))")) | ||
|
||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about just comparing explain results? |
||
| } | ||
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.
My major point is whether we need to output
$useCompression, $batchSize. How useful are they? Our explain output is already pretty long. Maybe we can skip them?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.
yea, I think the output should be the same with one in v2.3;
The output of this current pr is still different, so can you fix that way? @onursatici