aboutsummaryrefslogtreecommitdiff
path: root/sql/catalyst
diff options
context:
space:
mode:
authorWenchen Fan <cloud0fan@outlook.com>2015-09-04 15:17:37 -0700
committerAndrew Or <andrew@databricks.com>2015-09-04 15:17:37 -0700
commitc3c0e431a6280fbcf726ac9bc4db0e1b5a862be8 (patch)
tree455aba97f1c8abba6a6076be2d6bbc8a535246c1 /sql/catalyst
parent804a0126e0cc982cc9f22cc76ba7b874ebbef5dd (diff)
downloadspark-c3c0e431a6280fbcf726ac9bc4db0e1b5a862be8.tar.gz
spark-c3c0e431a6280fbcf726ac9bc4db0e1b5a862be8.tar.bz2
spark-c3c0e431a6280fbcf726ac9bc4db0e1b5a862be8.zip
[SPARK-10176] [SQL] Show partially analyzed plans when checkAnswer fails to analyze
This PR takes over https://github.com/apache/spark/pull/8389. This PR improves `checkAnswer` to print the partially analyzed plan in addition to the user friendly error message, in order to aid debugging failing tests. In doing so, I ran into a conflict with the various ways that we bring a SQLContext into the tests. Depending on the trait we refer to the current context as `sqlContext`, `_sqlContext`, `ctx` or `hiveContext` with access modifiers `public`, `protected` and `private` depending on the defining class. I propose we refactor as follows: 1. All tests should only refer to a `protected sqlContext` when testing general features, and `protected hiveContext` when it is a method that only exists on a `HiveContext`. 2. All tests should only import `testImplicits._` (i.e., don't import `TestHive.implicits._`) Author: Wenchen Fan <cloud0fan@outlook.com> Closes #8584 from cloud-fan/cleanupTests.
Diffstat (limited to 'sql/catalyst')
-rw-r--r--sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala1
1 files changed, 0 insertions, 1 deletions
diff --git a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala
index 765c1e2dda..f76a903dcc 100644
--- a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala
+++ b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala
@@ -26,7 +26,6 @@ import org.apache.spark.sql.catalyst.util._
* Provides helper methods for comparing plans.
*/
class PlanTest extends SparkFunSuite {
-
/**
* Since attribute references are given globally unique ids during analysis,
* we must normalize them to check if two different queries are identical.