aboutsummaryrefslogtreecommitdiff
path: root/sql/hive
diff options
context:
space:
mode:
authorReynold Xin <rxin@databricks.com>2015-03-27 14:56:57 -0700
committerReynold Xin <rxin@databricks.com>2015-03-27 14:56:57 -0700
commit3af7334304341fba091aa39ce2efbdfd167c697b (patch)
tree7f68680845e2269a92ebc61f9b33517292e53ddf /sql/hive
parentd5497ab1343e4d1b2a1c336f2e3520d74c6674a1 (diff)
downloadspark-3af7334304341fba091aa39ce2efbdfd167c697b.tar.gz
spark-3af7334304341fba091aa39ce2efbdfd167c697b.tar.bz2
spark-3af7334304341fba091aa39ce2efbdfd167c697b.zip
[SPARK-6564][SQL] SQLContext.emptyDataFrame should contain 0 row, not 1 row
Author: Reynold Xin <rxin@databricks.com> Closes #5226 from rxin/empty-df and squashes the following commits: 1306d88 [Reynold Xin] Proper fix. e135bb9 [Reynold Xin] [SPARK-6564][SQL] SQLContext.emptyDataFrame should contain 0 rows, not 1 row.
Diffstat (limited to 'sql/hive')
-rw-r--r--sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala4
1 files changed, 2 insertions, 2 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 c45c4ad70f..cd8e7c09ee 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
@@ -479,7 +479,7 @@ https://cwiki.apache.org/confluence/display/Hive/Enhanced+Aggregation%2C+Cube%2C
// Just fake explain for any of the native commands.
case Token("TOK_EXPLAIN", explainArgs)
if noExplainCommands.contains(explainArgs.head.getText) =>
- ExplainCommand(NoRelation)
+ ExplainCommand(OneRowRelation)
case Token("TOK_EXPLAIN", explainArgs)
if "TOK_CREATETABLE" == explainArgs.head.getText =>
val Some(crtTbl) :: _ :: extended :: Nil =
@@ -622,7 +622,7 @@ https://cwiki.apache.org/confluence/display/Hive/Enhanced+Aggregation%2C+Cube%2C
val relations = fromClause match {
case Some(f) => nodeToRelation(f)
- case None => NoRelation
+ case None => OneRowRelation
}
val withWhere = whereClause.map { whereNode =>