Skip to content
Snippets Groups Projects
Commit e566fe59 authored by q00251598's avatar q00251598 Committed by Cheng Lian
Browse files

[SPARK-6397][SQL] Check the missingInput simply

Author: q00251598 <qiyadong@huawei.com>

Closes #5082 from watermen/sql-missingInput and squashes the following commits:

25766b9 [q00251598] Check the missingInput simply
parent 4659468f
No related branches found
No related tags found
No related merge requests found
......@@ -85,9 +85,8 @@ class CheckAnalysis {
cleaned.foreach(checkValidAggregateExpression)
case o if o.children.nonEmpty &&
!o.references.filter(_.name != "grouping__id").subsetOf(o.inputSet) =>
val missingAttributes = (o.references -- o.inputSet).map(_.prettyString).mkString(",")
case o if o.children.nonEmpty && o.missingInput.nonEmpty =>
val missingAttributes = o.missingInput.map(_.prettyString).mkString(",")
val input = o.inputSet.map(_.prettyString).mkString(",")
failAnalysis(s"resolved attributes $missingAttributes missing from $input")
......
......@@ -191,6 +191,8 @@ 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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment