diff options
author | Michael Armbrust <michael@databricks.com> | 2014-12-17 12:43:51 -0800 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2014-12-17 12:43:51 -0800 |
commit | 7ad579ee972987863c09827554a6330aa54433b1 (patch) | |
tree | 5a3e828e920cf2901f8eba1077f49da81198d6f2 /sql/hive | |
parent | 4782def094fc5b5030a944290d2301f887f77a02 (diff) | |
download | spark-7ad579ee972987863c09827554a6330aa54433b1.tar.gz spark-7ad579ee972987863c09827554a6330aa54433b1.tar.bz2 spark-7ad579ee972987863c09827554a6330aa54433b1.zip |
[SPARK-3698][SQL] Fix case insensitive resolution of GetField.
Based on #2543.
Author: Michael Armbrust <michael@databricks.com>
Closes #3724 from marmbrus/resolveGetField and squashes the following commits:
0a47aae [Michael Armbrust] Fix case insensitive resolution of GetField.
Diffstat (limited to 'sql/hive')
-rw-r--r-- | sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveResolutionSuite.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveResolutionSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveResolutionSuite.scala index ee9d08ff75..422e843d2b 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveResolutionSuite.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveResolutionSuite.scala @@ -27,6 +27,17 @@ case class Data(a: Int, B: Int, n: Nested, nestedArray: Seq[Nested]) * A set of test cases expressed in Hive QL that are not covered by the tests included in the hive distribution. */ class HiveResolutionSuite extends HiveComparisonTest { + + case class NestedData(a: Seq[NestedData2], B: NestedData2) + case class NestedData2(a: NestedData3, B: NestedData3) + case class NestedData3(a: Int, B: Int) + + test("SPARK-3698: case insensitive test for nested data") { + sparkContext.makeRDD(Seq.empty[NestedData]).registerTempTable("nested") + // This should be successfully analyzed + sql("SELECT a[0].A.A from nested").queryExecution.analyzed + } + createQueryTest("table.attr", "SELECT src.key FROM src ORDER BY key LIMIT 1") |