File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -761,13 +761,6 @@ class Analyzer(
761761 }.isDefined
762762 }
763763
764- private def hasAggregation (expr : NamedExpression ): Boolean = {
765- expr.find {
766- case agg : AggregateExpression => true
767- case _ => false
768- }.isDefined
769- }
770-
771764 /**
772765 * From a Seq of [[NamedExpression ]]s, extract expressions containing window expressions and
773766 * other regular expressions that do not contain any window expression. For example, for
@@ -839,11 +832,8 @@ class Analyzer(
839832 extractedExprBuffer += withName
840833 withName.toAttribute
841834
842- case ne : Alias if hasWindowFunction(ne) && ! hasAggregation(ne) =>
843- ne.children.map(_.transform {
844- case e : NamedExpression => extractExpr(e)
845- })
846- ne
835+ // Extracts other attributes
836+ case attr : Attribute => extractExpr(attr)
847837
848838 }.asInstanceOf [NamedExpression ]
849839 }
You can’t perform that action at this time.
0 commit comments