Uh oh!
There was an error while loading. Please reload this page.
[SPARK-20281][SQL] Print the identical Range parameters of SparkContext APIs and SQL in explain - #17670
[SPARK-20281][SQL] Print the identical Range parameters of SparkContext APIs and SQL in explain#17670maropu wants to merge 4 commits into
Conversation
SparkQA
commented
Apr 18, 2017
Test build #75900 has finished for PR 17670 at commit
|
jaceklaskowski
commented
Apr 18, 2017
I think the change should rather be here where the built-in table-valued function |
maropu
commented
Apr 18, 2017
@gatorsmile WDYT? |
| val scRange = sqlContext.range(10) | ||
| val sqlRange = sqlContext.sql("SELECT * FROM range(10)") | ||
| assert(explainStr(scRange) === explainStr(sqlRange)) | ||
| } |
There was a problem hiding this comment.
I think this test case is not needed.
gatorsmile
commented
Apr 20, 2017
As @jaceklaskowski said, it would be good to fill |
maropu
commented
Apr 20, 2017
okay, I'll fix soon. Thanks! |
maropu
commented
Apr 20, 2017
Looking around the related code, I think we cannot easily set |
SparkQA
commented
Apr 20, 2017
Test build #75971 has started for PR 17670 at commit |
| @Experimental | ||
| @InterfaceStability.Evolving | ||
| def range(start: Long, end: Long, step: Long): Dataset[java.lang.Long] = { | ||
| range(start, end, step, numPartitions = sparkContext.defaultParallelism) |
There was a problem hiding this comment.
How about reverting the changes in this file? We can make the PR small enough. We can backport it to 2.2
gatorsmile
commented
Apr 20, 2017
Ok, I am fine to keep the existing way. |
gatorsmile
commented
Apr 20, 2017
LGTM except a comment. |
SparkQA
commented
Apr 20, 2017
Test build #75974 has started for PR 17670 at commit |
better to open another pr to backport into v2.2? |
maropu
commented
Apr 20, 2017
Jenkins, retest this please. |
SparkQA
commented
Apr 20, 2017
Test build #75975 has finished for PR 17670 at commit
|
maropu
commented
Apr 21, 2017
ping |
gatorsmile
commented
Apr 21, 2017
Thanks! Merging to master/2.2 |
…xt APIs and SQL in explain
## What changes were proposed in this pull request?
This pr modified code to print the identical `Range` parameters of SparkContext APIs and SQL in `explain` output. In the current master, they internally use `defaultParallelism` for `splits` by default though, they print different strings in explain output;
```
scala> spark.range(4).explain
== Physical Plan ==
*Range (0, 4, step=1, splits=Some(8))
scala> sql("select * from range(4)").explain
== Physical Plan ==
*Range (0, 4, step=1, splits=None)
```
## How was this patch tested?
Added tests in `SQLQuerySuite` and modified some results in the existing tests.
Author: Takeshi Yamamuro <yamamuro@apache.org>
Closes#17670 from maropu/SPARK-20281.
(cherry picked from commit 48d760d)
Signed-off-by: Xiao Li <gatorsmile@gmail.com>…xt APIs and SQL in explain
## What changes were proposed in this pull request?
This pr modified code to print the identical `Range` parameters of SparkContext APIs and SQL in `explain` output. In the current master, they internally use `defaultParallelism` for `splits` by default though, they print different strings in explain output;
```
scala> spark.range(4).explain
== Physical Plan ==
*Range (0, 4, step=1, splits=Some(8))
scala> sql("select * from range(4)").explain
== Physical Plan ==
*Range (0, 4, step=1, splits=None)
```
## How was this patch tested?
Added tests in `SQLQuerySuite` and modified some results in the existing tests.
Author: Takeshi Yamamuro <yamamuro@apache.org>
Closesapache#17670 from maropu/SPARK-20281.
What changes were proposed in this pull request?
This pr modified code to print the identical
Rangeparameters of SparkContext APIs and SQL inexplainoutput. In the current master, they internally usedefaultParallelismforsplitsby default though, they print different strings in explain output;How was this patch tested?
Added tests in
SQLQuerySuiteand modified some results in the existing tests.