You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/05/27 08:03:58 UTC

[GitHub] [iceberg] sfiend opened a new issue #2644: Flink: The primary key name of the same iceberg table should be same during different queries

sfiend opened a new issue #2644:
URL: https://github.com/apache/iceberg/issues/2644


   I think this is a bug in [#2410](https://github.com/apache/iceberg/pull/2410)
   
   When I run alter properties with flink sql on a table with a specified primary key, i got an error:"Altering schema is not supported yet.". I checked the code logic in FlinkSchemaUtil, it called Flink TableSchema.Builder.primaryKey(String... columns) to build primary key, and this function will use UUID.randomUUID() to generate a primary key name.
       
   Druing the alter run , first will call FlinkCatalog.getTable, then will call FlinkCatalog.alterTable, FlinkSchemaUtil.toSchema will be called twice and return two TableSchema with different primary key name for the same table. So I will get the above error when checking the two TableSchema in alterTable function.
   
   Seems it's unnecessary to add primary key name into metadata of table, so should we specify the primary key name which derived by splicing with the prefix "PK_" and the hashcode of primary key's column names like Flink when build the primary key?  Glad to know your thought @openinx 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] sfiend commented on issue #2644: Flink: The primary key name of the same iceberg table should be same during different queries

Posted by GitBox <gi...@apache.org>.
sfiend commented on issue #2644:
URL: https://github.com/apache/iceberg/issues/2644#issuecomment-851514916


   Hi bro @openinx, could you help me to take a look? Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org