spark-instrumented-optimizer/sql/catalyst/src/main
Kunal Khamar 6570cfd7ab [SPARK-19540][SQL] Add ability to clone SparkSession wherein cloned session has an identical copy of the SessionState
Forking a newSession() from SparkSession currently makes a new SparkSession that does not retain SessionState (i.e. temporary tables, SQL config, registered functions etc.) This change adds a method cloneSession() which creates a new SparkSession with a copy of the parent's SessionState.

Subsequent changes to base session are not propagated to cloned session, clone is independent after creation.
If the base is changed after clone has been created, say user registers new UDF, then the new UDF will not be available inside the clone. Same goes for configs and temp tables.

Unit tests

Author: Kunal Khamar <kkhamar@outlook.com>
Author: Shixiong Zhu <shixiong@databricks.com>

Closes #16826 from kunalkhamar/fork-sparksession.
2017-03-08 13:20:45 -08:00
..
antlr4/org/apache/spark/sql/catalyst/parser [SPARK-17078][SQL] Show stats when explain 2017-02-24 10:24:59 -08:00
java/org/apache/spark/sql [MINOR][BUILD] Fix lint-java breaks in Java 2017-02-27 08:44:26 +00:00
scala/org/apache/spark/sql [SPARK-19540][SQL] Add ability to clone SparkSession wherein cloned session has an identical copy of the SessionState 2017-03-08 13:20:45 -08:00