caican00 commented on code in PR #4292:
URL: https://github.com/apache/gravitino/pull/4292#discussion_r1696234494


##########
catalogs/catalog-lakehouse-paimon/src/main/java/org/apache/gravitino/catalog/lakehouse/paimon/GravitinoPaimonTable.java:
##########
@@ -51,7 +64,25 @@ protected TableOperations newOps() {
    * @return The converted Paimon table.
    */
   public Schema toPaimonTableSchema() {
-    Schema.Builder builder = 
Schema.newBuilder().comment(comment).options(properties);
+    Schema.Builder builder = Schema.newBuilder().comment(comment);
+    if (properties == null) {
+      properties = Maps.newHashMap();
+    }
+    if (partitioning == null) {
+      partitioning = EMPTY_PARTITIONING;
+    }
+
+    Map<String, String> normalizedProperties = new HashMap<>(properties);
+    normalizedProperties.remove(PRIMARY_KEY_IDENTIFIER);

Review Comment:
   imo, the Gravitino `Index`  is  designed for `RDBMS`, am i right?
   although paimon's primary key is also unique, there are some differences 
between it and `RDBMS's` primary key, for example: 
   1.  Index in `RDBMS` is globally ordered, but paimon's primary key is 
ordered  in bucket level.
   2.  insert a duplicate record will report an error in `RDBMS`, but now in 
paimon, if there is a duplicate record, the internal will be implicit 
deduplication for insert statement.
   3. paimon has not supported the clear concept of column Index so far.  If 
paimon supports it, we can support it later.
   
   WDYT? cc @FANNG1 



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to