aboutsummaryrefslogtreecommitdiff
path: root/sql/hive/src/main
diff options
context:
space:
mode:
authorMichael Armbrust <michael@databricks.com>2014-05-01 21:32:43 -0700
committerReynold Xin <rxin@apache.org>2014-05-01 21:33:13 -0700
commitd339b332cb72675b7d5431c5a01922e316f1cffc (patch)
tree6ea707e90cad365c0da4d26ff2b86543a51b1b85 /sql/hive/src/main
parentdd601bf92fe23ccc181ce0cbafe9412aa1fbb6de (diff)
downloadspark-d339b332cb72675b7d5431c5a01922e316f1cffc.tar.gz
spark-d339b332cb72675b7d5431c5a01922e316f1cffc.tar.bz2
spark-d339b332cb72675b7d5431c5a01922e316f1cffc.zip
[SQL] SPARK-1661 - Fix regex_serde test
The JIRA in question is actually reporting a bug with Shark, but I wanted to make sure Spark SQL did not have similar problems. This fixes a bug in our parsing code that was preventing the test from executing, but it looks like the RegexSerDe is working in Spark SQL. Author: Michael Armbrust <michael@databricks.com> Closes #595 from marmbrus/fixRegexSerdeTest and squashes the following commits: a4dc612 [Michael Armbrust] Add files created by hive to gitignore. efa6402 [Michael Armbrust] Fix Hive serde_regex test. (cherry picked from commit a43d9c14f2083d6632f410d74db98476e0e4d986) Signed-off-by: Reynold Xin <rxin@apache.org>
Diffstat (limited to 'sql/hive/src/main')
-rw-r--r--sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala
index 1777e96b67..1f688fe111 100644
--- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala
+++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala
@@ -347,7 +347,11 @@ private[hive] object HiveQl {
protected def nodeToPlan(node: Node): LogicalPlan = node match {
// Just fake explain for any of the native commands.
case Token("TOK_EXPLAIN", explainArgs) if nativeCommands contains explainArgs.head.getText =>
- NoRelation
+ ExplainCommand(NoRelation)
+ // Create tables aren't native commands due to CTAS queries, but we still don't need to
+ // explain them.
+ case Token("TOK_EXPLAIN", explainArgs) if explainArgs.head.getText == "TOK_CREATETABLE" =>
+ ExplainCommand(NoRelation)
case Token("TOK_EXPLAIN", explainArgs) =>
// Ignore FORMATTED if present.
val Some(query) :: _ :: _ :: Nil =