spark-instrumented-optimizer/sql/catalyst/src/test
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
..
java/org/apache/spark/sql [SPARK-18420][BUILD] Fix the errors caused by lint check in Java 2016-11-16 11:59:00 +00:00
resources [SPARK-14134][CORE] Change the package name used for shading classes. 2016-04-06 19:33:51 -07: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