diff options
author | Cheng Lian <lian@databricks.com> | 2015-03-23 12:15:19 +0800 |
---|---|---|
committer | Cheng Lian <lian@databricks.com> | 2015-03-23 12:15:19 +0800 |
commit | bf044def4c3a37a0fd4d5e70c2d57685cfd9fd71 (patch) | |
tree | bddb91224696ae9ebfa36c22bac1923495acbf5f /sql | |
parent | e566fe5982bac5d24e6be76e5d7d6270544a85e6 (diff) | |
download | spark-bf044def4c3a37a0fd4d5e70c2d57685cfd9fd71.tar.gz spark-bf044def4c3a37a0fd4d5e70c2d57685cfd9fd71.tar.bz2 spark-bf044def4c3a37a0fd4d5e70c2d57685cfd9fd71.zip |
Revert "[SPARK-6397][SQL] Check the missingInput simply"
This reverts commit e566fe5982bac5d24e6be76e5d7d6270544a85e6.
Diffstat (limited to 'sql')
2 files changed, 3 insertions, 4 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala index fb975ee5e7..4e8fc892f3 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala @@ -85,8 +85,9 @@ class CheckAnalysis { cleaned.foreach(checkValidAggregateExpression) - case o if o.children.nonEmpty && o.missingInput.nonEmpty => - val missingAttributes = o.missingInput.map(_.prettyString).mkString(",") + case o if o.children.nonEmpty && + !o.references.filter(_.name != "grouping__id").subsetOf(o.inputSet) => + val missingAttributes = (o.references -- o.inputSet).map(_.prettyString).mkString(",") val input = o.inputSet.map(_.prettyString).mkString(",") failAnalysis(s"resolved attributes $missingAttributes missing from $input") diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicOperators.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicOperators.scala index a94b2d2095..384fe53a68 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicOperators.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicOperators.scala @@ -191,8 +191,6 @@ case class Expand( val sizeInBytes = child.statistics.sizeInBytes * projections.length Statistics(sizeInBytes = sizeInBytes) } - - override def missingInput = super.missingInput.filter(_.name != VirtualColumn.groupingIdName) } trait GroupingAnalytics extends UnaryNode { |