Skip to content

Commit

Permalink
[SQL][Minor] Use analyzed logical instead of unresolved in HiveCompar…
Browse files Browse the repository at this point in the history
…isonTest

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
  • Loading branch information
chenghao-intel authored and marmbrus committed Apr 3, 2015
1 parent 5db8912 commit dfd2982
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit dfd2982

Please sign in to comment.