aboutsummaryrefslogtreecommitdiff
path: root/sql/hive/src/test/scala
diff options
context:
space:
mode:
authorMichael Armbrust <michael@databricks.com>2014-08-05 11:17:50 -0700
committerMichael Armbrust <michael@databricks.com>2014-08-05 11:17:50 -0700
commit6e821e3d1ae1ed23459bc7f1098510b968130152 (patch)
tree288ef784edd88ad66a5536ef272aafcdb1593f1e /sql/hive/src/test/scala
parent1c5555a23d3aa40423d658cfbf2c956ad415a6b1 (diff)
downloadspark-6e821e3d1ae1ed23459bc7f1098510b968130152.tar.gz
spark-6e821e3d1ae1ed23459bc7f1098510b968130152.tar.bz2
spark-6e821e3d1ae1ed23459bc7f1098510b968130152.zip
[SPARK-2860][SQL] Fix coercion of CASE WHEN.
Author: Michael Armbrust <michael@databricks.com> Closes #1785 from marmbrus/caseNull and squashes the following commits: 126006d [Michael Armbrust] better error message 2fe357f [Michael Armbrust] Fix coercion of CASE WHEN.
Diffstat (limited to 'sql/hive/src/test/scala')
-rw-r--r--sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala
index aa810a2912..2f0be49b6a 100644
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala
@@ -32,6 +32,9 @@ case class TestData(a: Int, b: String)
*/
class HiveQuerySuite extends HiveComparisonTest {
+ createQueryTest("null case",
+ "SELECT case when(true) then 1 else null end FROM src LIMIT 1")
+
createQueryTest("single case",
"""SELECT case when true then 1 else 2 end FROM src LIMIT 1""")