Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I'm a bit confused. named parameter has been widely used in the Spark codebase, what's wrong with it?

Copy link
Contributor Author

@dcoliversun dcoliversun May 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, named parameter is right. But there is a compilation error when k8s integration test. Please see PR description for more information. And you can exec this command to check it again

build/sbt -Pkubernetes -Pkubernetes-integration-tests -Dtest.exclude.tags=r "kubernetes-integration-tests/test"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why the issue only happens in this place?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because deleteColumn#TableChange is Java file. I replace named parameter with comment, because it's used in Apache Spark.

blockHandler.applicationRemoved(appId, true /* cleanupLocalDirs */)

TableChange.deleteColumn(Array(name), false /* ifExists */)
}
val addChanges = columnsToAdd.map { col =>
assert(col.path.isEmpty)
Expand Down