Skip to content

Commit b383c04

Browse files
aokolnychyiSandishKumarHN
authored andcommitted
[SPARK-38959][SQL][FOLLOW-UP] Address feedback for RowLevelOperationRuntimeGroupFiltering
### What changes were proposed in this pull request? This PR is to address the feedback on PR apache#36304 after that change was merged. ### Why are the changes needed? These changes are needed for better code quality. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing tests. Closes apache#38526 from aokolnychyi/spark-38959-follow-up. Authored-by: aokolnychyi <aokolnychyi@apple.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
1 parent b72f7e2 commit b383c04

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

sql/core/src/main/scala/org/apache/spark/sql/execution/dynamicpruning/RowLevelOperationRuntimeGroupFiltering.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,8 @@ case class RowLevelOperationRuntimeGroupFiltering(optimizeSubqueries: Rule[Logic
7878
// clone the relation and assign new expr IDs to avoid conflicts
7979
matchingRowsPlan transformUpWithNewOutput {
8080
case r: DataSourceV2Relation if r eq relation =>
81-
val oldOutput = r.output
82-
val newOutput = oldOutput.map(_.newInstance())
83-
r.copy(output = newOutput) -> oldOutput.zip(newOutput)
81+
val newRelation = r.newInstance()
82+
newRelation -> r.output.zip(newRelation.output)
8483
}
8584
}
8685

0 commit comments

Comments
 (0)