We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ecbc30 commit 09296c4Copy full SHA for 09296c4
sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
@@ -4488,11 +4488,13 @@ private[sql] object EasilyFlattenable {
4488
} ))) {
4489
None
4490
} else {
4491
- val remappedNewProjList = newProjList.map(ne => ne match {
+ val remappedNewProjList = newProjList.map(ne => (ne transformUp {
4492
case attr: AttributeReference => projList.find(
4493
_.toAttribute.canonicalized == attr.canonicalized).get
4494
- case x => x
4495
- })
+ case u: UnresolvedAttribute if u.getTagValue(LogicalPlan.PLAN_ID_TAG).isDefined =>
+ u.setTagValue(LogicalPlan.PLAN_ID_TAG, child)
4496
+ u
4497
+ }).asInstanceOf[NamedExpression])
4498
Option(p.copy(projectList = remappedNewProjList))
4499
}
4500
0 commit comments