Skip to content

Conversation

@RussellSpitzer
Copy link
Member

@RussellSpitzer RussellSpitzer commented Aug 3, 2018

(Branch-2.3)

What changes were proposed in this pull request?

Previously Pyspark used the private constructor for SparkSession when
building that object. This resulted in a SparkSession without checking
the sql.extensions parameter for additional session extensions. To fix
this we instead use the Session.builder() path as SparkR uses, this
loads the extensions and allows their use in PySpark.

How was this patch tested?

This was manually tested by passing a class to spark.sql.extensions and making sure it's included strategies appeared in the spark._jsparkSession.sessionState.planner.strategies list. We could add a automatic test but i'm not very familiar with the Pyspark Testing framework. But I would be glad to implement that if requested.

@SparkQA
Copy link

SparkQA commented Aug 3, 2018

Test build #94146 has finished for PR 21989 at commit c82bdb8.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Previously Pyspark used the private constructor for SparkSession when
building that object. This resulted in a SparkSession without checking
the sql.extensions parameter for additional session extensions. To fix
this we instead use the Session.builder() path as SparkR uses, this
loads the extensions and allows their use in PySpark.
@SparkQA
Copy link

SparkQA commented Aug 3, 2018

Test build #94152 has finished for PR 21989 at commit 0951637.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@kiszk
Copy link
Member

kiszk commented Aug 6, 2018

Is this same as #21990? Would it be possible to close this?

@RussellSpitzer RussellSpitzer changed the title [SPARK-25003][PYSPARK] Use SessionExtensions in Pyspark [SPARK-25003][PYSPARK][BRANCH-2.3] Use SessionExtensions in Pyspark Aug 6, 2018
@RussellSpitzer
Copy link
Member Author

@kiszk sure, it all depends which branch the merge target should be I wasn't sure which one was being used for changes of this nature. Technically it's a bug fix I believe.

@RussellSpitzer RussellSpitzer deleted the SPARK-25003-branch-2.3 branch August 7, 2018 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants