File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -1141,11 +1141,9 @@ class Analyzer(
11411141 val (newExprs, newChild) = resolveExprsAndAddMissingAttrs(maybeResolvedExprs, g.child)
11421142 (newExprs, g.copy(join = true , child = newChild))
11431143
1144- // For `Distinct`, we can't recursively resolve and add attributes via its children.
1145- case d : Distinct =>
1146- (exprs.map(resolveExpression(_, d)), d)
1147-
1148- case u : UnaryNode =>
1144+ // For `Distinct` and `SubqueryAlias`, we can't recursively resolve and add attributes
1145+ // via its children.
1146+ case u : UnaryNode if ! u.isInstanceOf [Distinct ] && ! u.isInstanceOf [SubqueryAlias ] =>
11491147 val maybeResolvedExprs = exprs.map(resolveExpression(_, u))
11501148 val (newExprs, newChild) = resolveExprsAndAddMissingAttrs(maybeResolvedExprs, u.child)
11511149 (newExprs, u.withNewChildren(Seq (newChild)))
You can’t perform that action at this time.
0 commit comments