Uh oh!
There was an error while loading. Please reload this page.
[SPARK-15084][PYTHON][SQL] Use builder pattern to create SparkSession in PySpark. - #12860
[SPARK-15084][PYTHON][SQL] Use builder pattern to create SparkSession in PySpark.#12860dongjoon-hyun wants to merge 6 commits into
Conversation
dongjoon-hyun
commented
May 3, 2016
@rxin . |
There was a problem hiding this comment.
we should update SparkSession's doc itself to indicate how to create it.
rxin
commented
May 3, 2016
cc @davies can you take a look at the builder API? |
SparkQA
commented
May 3, 2016
Test build #57589 has finished for PR 12860 at commit
|
SparkQA
commented
May 3, 2016
Test build #57592 has finished for PR 12860 at commit
|
SparkQA
commented
May 3, 2016
Test build #57593 has finished for PR 12860 at commit
|
SparkQA
commented
May 3, 2016
Test build #57602 has finished for PR 12860 at commit
|
There was a problem hiding this comment.
We could create a builder here, then we can use it like this:
SparkSession.builder.master().getOrCreater()
There was a problem hiding this comment.
nvm, we also create a Builder every time in Scala.
dongjoon-hyun
commented
May 3, 2016
Thank you for review, @davies . I'll update soon. |
dongjoon-hyun
commented
May 3, 2016
@davies . I addressed two comments, but I'm not sure about the first one. |
There was a problem hiding this comment.
It's weird to use SQLContext to create an SparkSession, can't we create an SparkSession directly?
There was a problem hiding this comment.
We also use that in Scala, it's OK for now.
There was a problem hiding this comment.
if we just call scala's getOrCreate here then we don't need to fix this in the future
andrewor14
commented
May 3, 2016
Looks good otherwise |
SparkQA
commented
May 3, 2016
Test build #57649 has finished for PR 12860 at commit
|
dongjoon-hyun
commented
May 3, 2016
Thank you, @davies and @andrewor14 . |
rxin
commented
May 3, 2016
It's been merged! |
dongjoon-hyun
commented
May 3, 2016
Great! Thank you, @rxin |
…PySpark. This is a port of corresponding Scala builder pattern code. `sql.py` is modified as a target example case.
SparkQA
commented
May 3, 2016
Test build #57683 has finished for PR 12860 at commit
|
SparkQA
commented
May 3, 2016
Test build #57684 has finished for PR 12860 at commit
|
dongjoon-hyun
commented
May 4, 2016
Hi, @davies and @andrewor14 . Now, it's updated.
For the calling Scala's |
What changes were proposed in this pull request?
This is a python port of corresponding Scala builder pattern code.
sql.pyis modified as a target example case.How was this patch tested?
Manual.