Skip to content

Commit

Permalink
SPARK-45959
Browse files Browse the repository at this point in the history
  • Loading branch information
ashahid committed Nov 24, 2023
1 parent 7716ee9 commit 10a76ba
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ private[sql] object EasilyFlattenable {
}).map(_.toAttribute)).intersect(AttributeSet(child.output))
if (tinkeredOrNewNamedExprs.exists(ne => ne.references.exists {
case attr: AttributeReference => attribsReassignedInProj.contains(attr)
// case u: UnresolvedAttribute => attribsReassignedInProj.exists(_.name == u.name)
case u: UnresolvedAttribute => attribsReassignedInProj.exists(_.name == u.name)
} || ne.collectFirst{
case u: UnresolvedFunction => u
case u: UnresolvedAttribute => u
case ex if !ex.deterministic => ex
case ex if ex.isInstanceOf[UserDefinedExpression] => ex
case u: UnresolvedAttribute => u
}.nonEmpty)) {
None
} else {
Expand All @@ -62,13 +62,13 @@ private[sql] object EasilyFlattenable {
case al: Alias => al.child
case _ => x
}).getOrElse(attr)
/*

case u: UnresolvedAttribute => projList.find(
_.toAttribute.name == u.name).map(x => x match {
case al: Alias => al.child
case _ => x
}).getOrElse(u)
*/

}).asInstanceOf[NamedExpression]
})
Option(p.copy(projectList = remappedNewProjList))
Expand Down

0 comments on commit 10a76ba

Please sign in to comment.