diff options
author | Wenchen Fan <cloud0fan@outlook.com> | 2015-07-06 13:26:46 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-07-06 13:26:46 -0700 |
commit | 0e194645f42be0d6ac9b5a712f8fc1798418736d (patch) | |
tree | 49d5b3ff8e8b561758f33b626b9309d342a0982b /sql/core | |
parent | 293225e0cd9318ad368dde30ac6a17725d33ebb6 (diff) | |
download | spark-0e194645f42be0d6ac9b5a712f8fc1798418736d.tar.gz spark-0e194645f42be0d6ac9b5a712f8fc1798418736d.tar.bz2 spark-0e194645f42be0d6ac9b5a712f8fc1798418736d.zip |
[SPARK-8837][SPARK-7114][SQL] support using keyword in column name
Author: Wenchen Fan <cloud0fan@outlook.com>
Closes #7237 from cloud-fan/parser and squashes the following commits:
e7b49bb [Wenchen Fan] support using keyword in column name
Diffstat (limited to 'sql/core')
-rw-r--r-- | sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala index cc6af1ccc1..12ad019e8b 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala @@ -1458,4 +1458,13 @@ class SQLQuerySuite extends QueryTest with BeforeAndAfterAll with SQLTestUtils { checkAnswer(sql("SELECT * FROM t ORDER BY NULL"), Seq(Row(1, 2), Row(1, 2))) } } + + test("SPARK-8837: use keyword in column name") { + withTempTable("t") { + val df = Seq(1 -> "a").toDF("count", "sort") + checkAnswer(df.filter("count > 0"), Row(1, "a")) + df.registerTempTable("t") + checkAnswer(sql("select count, sort from t"), Row(1, "a")) + } + } } |