aboutsummaryrefslogtreecommitdiff
path: root/sql/hive/compatibility/src/test/scala
diff options
context:
space:
mode:
authorAndrew Or <andrew@databricks.com>2016-02-27 19:51:28 -0800
committerReynold Xin <rxin@databricks.com>2016-02-27 19:51:28 -0800
commitcca79fad66c4315b0ed6de59fd87700a540e6646 (patch)
treeca305c4e716f0138e1130bc7d6ab3a5bcf3928cf /sql/hive/compatibility/src/test/scala
parent4c5e968db23db41c0bea802819ebd75fad63bc2b (diff)
downloadspark-cca79fad66c4315b0ed6de59fd87700a540e6646.tar.gz
spark-cca79fad66c4315b0ed6de59fd87700a540e6646.tar.bz2
spark-cca79fad66c4315b0ed6de59fd87700a540e6646.zip
[SPARK-13526][SQL] Move SQLContext per-session states to new class
## What changes were proposed in this pull request? This creates a `SessionState`, which groups a few fields that existed in `SQLContext`. Because `HiveContext` extends `SQLContext` we also need to make changes there. This is mainly a cleanup task that will soon pave the way for merging the two contexts. ## How was this patch tested? Existing unit tests; this patch introduces no change in behavior. Author: Andrew Or <andrew@databricks.com> Closes #11405 from andrewor14/refactor-session.
Diffstat (limited to 'sql/hive/compatibility/src/test/scala')
-rw-r--r--sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala b/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala
index d15f883138..0dc2a95eea 100644
--- a/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala
+++ b/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala
@@ -55,7 +55,7 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
// Enable in-memory partition pruning for testing purposes
TestHive.setConf(SQLConf.IN_MEMORY_PARTITION_PRUNING, true)
// Use Hive hash expression instead of the native one
- TestHive.functionRegistry.unregisterFunction("hash")
+ TestHive.sessionState.functionRegistry.unregisterFunction("hash")
RuleExecutor.resetTime()
}
@@ -65,7 +65,7 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter {
Locale.setDefault(originalLocale)
TestHive.setConf(SQLConf.COLUMN_BATCH_SIZE, originalColumnBatchSize)
TestHive.setConf(SQLConf.IN_MEMORY_PARTITION_PRUNING, originalInMemoryPartitionPruning)
- TestHive.functionRegistry.restore()
+ TestHive.sessionState.functionRegistry.restore()
// For debugging dump some statistics about how much time was spent in various optimizer rules.
logWarning(RuleExecutor.dumpTimeSpent())