Skip to content

Commit

Permalink
[SPARK-48321][CONNECT][TESTS] Avoid using deprecated methods in dsl
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
Avoid using deprecated methods in dsl

### Why are the changes needed?
`putAllRenameColumnsMap` was deprecated

### Does this PR introduce _any_ user-facing change?
no

### How was this patch tested?
ci

### Was this patch authored or co-authored using generative AI tooling?
no

Closes #46635 from zhengruifeng/with_col_rename_dsl.

Authored-by: Ruifeng Zheng <ruifengz@apache.org>
Signed-off-by: Ruifeng Zheng <ruifengz@apache.org>
  • Loading branch information
zhengruifeng committed May 17, 2024
1 parent 1ea1561 commit 15fb478
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,13 @@ package object dsl {
WithColumnsRenamed
.newBuilder()
.setInput(logicalPlan)
.putAllRenameColumnsMap(renameColumnsMap.asJava))
.addAllRenames(renameColumnsMap.toSeq.map { case (k, v) =>
WithColumnsRenamed.Rename
.newBuilder()
.setColName(k)
.setNewColName(v)
.build()
}.asJava))
.build()
}

Expand Down

0 comments on commit 15fb478

Please sign in to comment.