Skip to content

Commit

Permalink
fix pre-projection not take effect (#7863)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinyhZou authored Nov 8, 2024
1 parent cfb55ef commit aac1b87
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ case class PushdownAggregatePreProjectionAheadExpand(session: SparkSession)
def projectInputExists(expr: Expression, inputs: Seq[Attribute]): Boolean = {
expr.children.foreach {
case a: Attribute =>
return inputs.indexOf(a) != -1
return inputs.exists(i => i.name.equals(a.name) && i.exprId.equals(a.exprId))
case p: Expression =>
return projectInputExists(p, inputs)
case _ =>
Expand Down

0 comments on commit aac1b87

Please sign in to comment.