This is an automated email from the ASF dual-hosted git repository.
huaxingao pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.3 by this push:
new cf13262bc2d [SPARK-38939][SQL][FOLLOWUP] Replace named parameter with
comment in ReplaceColumns
cf13262bc2d is described below
commit cf13262bc2d7ee1bce8c08292725353b2beccadd
Author: Qian.Sun <[email protected]>
AuthorDate: Mon May 9 10:00:05 2022 -0700
[SPARK-38939][SQL][FOLLOWUP] Replace named parameter with comment in
ReplaceColumns
### What changes were proposed in this pull request?
This PR aims to replace named parameter with comment in `ReplaceColumns`.
### Why are the changes needed?
#36252 changed signature of deleteColumn#**TableChange.java**, but this PR
breaks sbt compilation in k8s integration test.
```shell
> build/sbt -Pkubernetes -Pkubernetes-integration-tests
-Dtest.exclude.tags=r -Dspark.kubernetes.test.imageRepo=kubespark
"kubernetes-integration-tests/test"
[error]
/Users/IdeaProjects/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2AlterTableCommands.scala:147:45:
not found: value ifExists
[error] TableChange.deleteColumn(Array(name), ifExists = false)
[error] ^
[error]
/Users/IdeaProjects/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2AlterTableCommands.scala:159:19:
value ++ is not a member of Array[Nothing]
[error] deleteChanges ++ addChanges
[error] ^
[error] two errors found
[error] (catalyst / Compile / compileIncremental) Compilation failed
```
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Pass the GA and k8s integration test.
Closes #36487 from dcoliversun/SPARK-38939.
Authored-by: Qian.Sun <[email protected]>
Signed-off-by: huaxingao <[email protected]>
(cherry picked from commit 16b5124d75dc974c37f2fd87c78d231f8a3bf772)
Signed-off-by: huaxingao <[email protected]>
---
.../apache/spark/sql/catalyst/plans/logical/v2AlterTableCommands.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2AlterTableCommands.scala
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2AlterTableCommands.scala
index 8cc93c2dd09..4bd4f58b6a7 100644
---
a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2AlterTableCommands.scala
+++
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2AlterTableCommands.scala
@@ -144,7 +144,7 @@ case class ReplaceColumns(
require(table.resolved)
val deleteChanges = table.schema.fieldNames.map { name =>
// REPLACE COLUMN should require column to exist
- TableChange.deleteColumn(Array(name), ifExists = false)
+ TableChange.deleteColumn(Array(name), false /* ifExists */)
}
val addChanges = columnsToAdd.map { col =>
assert(col.path.isEmpty)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]