-
Notifications
You must be signed in to change notification settings - Fork 998
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
[core]: support rename primary key columns and bucket key columns #3809
[core]: support rename primary key columns and bucket key columns #3809
Conversation
cc @JingsongLi @FangYongs Could you please review this? Thanks |
CC @tsreaper |
Gentle ping @JingsongLi @tsreaper, can you help review this when you have time? This can be useful to us, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @zhongyujiang , can you rebase master?
Can this support when table is empty?
e5c7d3d
to
e1075ab
Compare
Rebased.
I guess this is a typo, what you mean is 'non-empty'? |
org.apache.paimon.schema.SchemaEvolutionUtil#createDataProjection I have investigate more to confirm this. |
|
||
assertThat(actual).containsExactlyInAnyOrder("[1,aaa]", "[2,bbb]"); | ||
|
||
spark.sql("INSERT INTO test_rename_primary_key_table VALUES(1, 'AAA'), (2, 'BBB')"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e1075ab
to
8669d0c
Compare
The CI failure seems caused by flaky tests, unreleated to this, I've filed a issue on that: #3908 |
It is true, but this is very dangerous and may lead to many bugs. |
Hi @JingsongLi Could you share your specific concerns? From what I've observed, renaming a primary key doesn't seem to differ from renaming other keys; it appears to be safe. I believe renaming the primary key is a necessary part of full schema evolution, and we have such a requirement ourselves. So if you have any concerns, I would be more than happy to investigate further and try to address them. Thank you! |
re-open to trigger tests. |
71d7d27
to
9ca3ff8
Compare
+1 |
Purpose
Support renaming primary keys and bucket keys that are not partition keys.
Tests
Added schema evolution tests and Spark e2e tests
API and Format
Not affected
Documentation