spark-instrumented-optimizer/sql/hive
Andrew Or 8187b3ae47 [SPARK-9580] [SQL] Replace singletons in SQL tests
A fundamental limitation of the existing SQL tests is that *there is simply no way to create your own `SparkContext`*. This is a serious limitation because the user may wish to use a different master or config. As a case in point, `BroadcastJoinSuite` is entirely commented out because there is no way to make it pass with the existing infrastructure.

This patch removes the singletons `TestSQLContext` and `TestData`, and instead introduces a `SharedSQLContext` that starts a context per suite. Unfortunately the singletons were so ingrained in the SQL tests that this patch necessarily needed to touch *all* the SQL test files.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/apache/spark/8111)
<!-- Reviewable:end -->

Author: Andrew Or <andrew@databricks.com>

Closes #8111 from andrewor14/sql-tests-refactor.
2015-08-13 17:42:01 -07:00
..
compatibility/src/test/scala/org/apache/spark/sql/hive/execution [SPARK-9141] [SQL] Remove project collapsing from DataFrame API 2015-08-05 09:01:45 -07:00
src [SPARK-9580] [SQL] Replace singletons in SQL tests 2015-08-13 17:42:01 -07:00
pom.xml [SPARK-8064] [SQL] Build against Hive 1.2.1 2015-08-03 15:24:42 -07:00