You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by an...@apache.org on 2016/04/06 20:12:54 UTC
spark git commit: [SPARK-14383][SQL] missing "|" in the g4 file
Repository: spark
Updated Branches:
refs/heads/master 5abd02c02 -> 3c8d88216
[SPARK-14383][SQL] missing "|" in the g4 file
## What changes were proposed in this pull request?
A very trivial one. It missed "|" between DISTRIBUTE and UNSET.
## How was this patch tested?
I do not think it is really needed.
Author: bomeng <bm...@us.ibm.com>
Closes #12156 from bomeng/SPARK-14383.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/3c8d8821
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/3c8d8821
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/3c8d8821
Branch: refs/heads/master
Commit: 3c8d8821654e3d82ef927c55272348e1bcc34a79
Parents: 5abd02c
Author: bomeng <bm...@us.ibm.com>
Authored: Wed Apr 6 11:12:48 2016 -0700
Committer: Andrew Or <an...@databricks.com>
Committed: Wed Apr 6 11:12:48 2016 -0700
----------------------------------------------------------------------
.../antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 | 2 +-
.../apache/spark/sql/execution/command/DDLCommandSuite.scala | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/3c8d8821/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
----------------------------------------------------------------------
diff --git a/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 b/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
index 96c170b..8a45b4f 100644
--- a/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
+++ b/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
@@ -645,7 +645,7 @@ nonReserved
| NO | DATA
| START | TRANSACTION | COMMIT | ROLLBACK | WORK | ISOLATION | LEVEL
| SNAPSHOT | READ | WRITE | ONLY
- | SORT | CLUSTER | DISTRIBUTE UNSET | TBLPROPERTIES | SKEWED | STORED | DIRECTORIES | LOCATION
+ | SORT | CLUSTER | DISTRIBUTE | UNSET | TBLPROPERTIES | SKEWED | STORED | DIRECTORIES | LOCATION
| EXCHANGE | ARCHIVE | UNARCHIVE | FILEFORMAT | TOUCH | COMPACT | CONCATENATE | CHANGE | FIRST
| AFTER | CASCADE | RESTRICT | BUCKETS | CLUSTERED | SORTED | PURGE | INPUTFORMAT | OUTPUTFORMAT
| INPUTDRIVER | OUTPUTDRIVER | DBPROPERTIES | DFS | TRUNCATE | METADATA | REPLICATION | COMPUTE
http://git-wip-us.apache.org/repos/asf/spark/blob/3c8d8821/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandSuite.scala
----------------------------------------------------------------------
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandSuite.scala
index 46dcadd..8e63b69 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandSuite.scala
@@ -20,6 +20,7 @@ package org.apache.spark.sql.execution.command
import org.apache.spark.sql.catalyst.TableIdentifier
import org.apache.spark.sql.catalyst.parser.ParseException
import org.apache.spark.sql.catalyst.plans.PlanTest
+import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, Project}
import org.apache.spark.sql.execution.SparkSqlParser
import org.apache.spark.sql.execution.datasources.BucketSpec
import org.apache.spark.sql.types._
@@ -685,4 +686,10 @@ class DDLCommandSuite extends PlanTest {
parser.parsePlan("SELECT TRANSFORM (key, value) USING 'cat' AS (tKey, tValue) FROM testData")
}
}
+
+ test("SPARK-14383: DISTRIBUTE and UNSET as non-keywords") {
+ val sql = "SELECT distribute, unset FROM x"
+ val parsed = parser.parsePlan(sql)
+ assert(parsed.isInstanceOf[Project])
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org