Skip to content

Commit

Permalink
[SPARK-38959][SQL][FOLLOW-UP] Address feedback for RowLevelOperationR…
Browse files Browse the repository at this point in the history
…untimeGroupFiltering

### What changes were proposed in this pull request?

This PR is to address the feedback on PR #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 #38526 from aokolnychyi/spark-38959-follow-up.

Authored-by: aokolnychyi <aokolnychyi@apple.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
  • Loading branch information
aokolnychyi authored and cloud-fan committed Nov 8, 2022
1 parent 9cd5505 commit 7429223
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@ case class RowLevelOperationRuntimeGroupFiltering(optimizeSubqueries: Rule[Logic
// clone the relation and assign new expr IDs to avoid conflicts
matchingRowsPlan transformUpWithNewOutput {
case r: DataSourceV2Relation if r eq relation =>
val oldOutput = r.output
val newOutput = oldOutput.map(_.newInstance())
r.copy(output = newOutput) -> oldOutput.zip(newOutput)
val newRelation = r.newInstance()
newRelation -> r.output.zip(newRelation.output)
}
}

Expand Down

0 comments on commit 7429223

Please sign in to comment.