-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[hive] repair table support sync all properties to hms #4047
Conversation
@@ -819,6 +819,20 @@ private void updateHmsTable(Table table, Identifier identifier, TableSchema sche | |||
private void updateHmsTablePars(Table table, TableSchema schema) { | |||
if (syncAllProperties()) { | |||
table.getParameters().putAll(schema.options()); | |||
if (!schema.primaryKeys().isEmpty()) { |
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.
Please extract a method to reuse.
Just curious,in real scene Paimon should not support alter pk,partitionkey? @herefree |
Yes |
Yes, if you have some history paimon table which was not syn pk or partitionkey to hive meta, you can use repair table.It also need to add some code to support it, just like this. |
Get,but the title maybe not fitable,alter primary-key can take a look at SparkSchemaEvolutionITCase##testSetAndRemoveOption which can not support. |
Yes,you are right,i'll change the title. |
+1 |
When a table is created by spark sql, the primary key and partition information are not synchronized to the hms |
Purpose
Linked issue: close #xxx
Follow up #4038
Tests
API and Format
Documentation