diff options
author | Cheng Hao <hao.cheng@intel.com> | 2015-04-02 17:20:31 -0700 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2015-04-02 17:20:31 -0700 |
commit | dfd2982bc7047732197f1d9ad77221e9c6076fc2 (patch) | |
tree | 2c36d4914091940be7f4476c609cf6d6dca10b29 | |
parent | 5db89127e72630aec7c5552f2c84018ae18d03fe (diff) | |
download | spark-dfd2982bc7047732197f1d9ad77221e9c6076fc2.tar.gz spark-dfd2982bc7047732197f1d9ad77221e9c6076fc2.tar.bz2 spark-dfd2982bc7047732197f1d9ad77221e9c6076fc2.zip |
[SQL][Minor] Use analyzed logical instead of unresolved in HiveComparisonTest
Some internal unit test failed due to the logical plan node in pattern matching in `HiveComparisonTest`, e.g.
https://github.com/apache/spark/blob/master/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala#L137
Which will may call the `output` function on an unresolved logical plan.
Author: Cheng Hao <hao.cheng@intel.com>
Closes #4946 from chenghao-intel/logical and squashes the following commits:
432ecb3 [Cheng Hao] Use analyzed instead of logical in HiveComparisonTest
-rw-r--r-- | sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala index 8f32852420..a5ec312ee4 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala @@ -138,7 +138,7 @@ abstract class HiveComparisonTest case _ => plan.children.iterator.exists(isSorted) } - val orderedAnswer = hiveQuery.logical match { + val orderedAnswer = hiveQuery.analyzed match { // Clean out non-deterministic time schema info. // Hack: Hive simply prints the result of a SET command to screen, // and does not return it as a query answer. @@ -299,7 +299,7 @@ abstract class HiveComparisonTest val hiveQueries = queryList.map(new TestHive.HiveQLQueryExecution(_)) // Make sure we can at least parse everything before attempting hive execution. - hiveQueries.foreach(_.logical) + hiveQueries.foreach(_.analyzed) val computedResults = (queryList.zipWithIndex, hiveQueries, hiveCacheFiles).zipped.map { case ((queryString, i), hiveQuery, cachedAnswerFile)=> try { |