Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spark 3.4: disallow update identifier fields through alter table set tblproperties #8320

Merged

Conversation

advancedxy
Copy link
Contributor

Unlike sort-order, I noticed it's still allowed to update the identifier-fields property through alter table when browsing related code. Although both sort-order and identifier-fields have been overwrote in org.apache.iceberg.spark.source.SparkTable#properties method, it wouldn't cause any correctness problems. I think it's better to throw an exception for identifier-fields as well.

@github-actions github-actions bot added the spark label Aug 14, 2023
@@ -55,7 +59,7 @@ public void removeTable() {

@Test
public void testAddColumnNotNull() {
Assertions.assertThatThrownBy(() -> sql("ALTER TABLE %s ADD COLUMN c3 INT NOT NULL", tableName))
assertThatThrownBy(() -> sql("ALTER TABLE %s ADD COLUMN c3 INT NOT NULL", tableName))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we are migrating to AssertJ, I changed some of the assertion code to the AssertJ ones.

@advancedxy
Copy link
Contributor Author

@liuml07 and @jackye1995 would you mind to review this since you guys changed the related parts of code?

@aokolnychyi aokolnychyi merged commit 513a2d8 into apache:master Aug 15, 2023
31 checks passed
@aokolnychyi
Copy link
Contributor

Thanks, @advancedxy!

@advancedxy
Copy link
Contributor Author

Thanks @aokolnychyi for reviewing and merging 🎆 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants