Skip to content
Prev Previous commit
Next Next commit
update
  • Loading branch information
Hisoka-X committed Aug 10, 2023
commit 410b2369e22b9e8606df0bbe4083433ccbd9a5d9
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,12 @@ object DeduplicateRelations extends Rule[LogicalPlan] {
def rewriteAttrs[T <: Expression](
exprs: Seq[T],
attrMap: Map[Attribute, Attribute]): Seq[T] = {
exprs.map(expr =>
exprs.map { expr =>
expr.transformWithPruning(_.containsPattern(ATTRIBUTE_REFERENCE)) {
case a: AttributeReference =>
attrMap.getOrElse(a, a)
}.asInstanceOf[T])
}.asInstanceOf[T]
}
}

planWithNewChildren match {
Expand Down