FANNG1 commented on code in PR #6362:
URL: https://github.com/apache/gravitino/pull/6362#discussion_r1929703228

##########
catalogs/catalog-lakehouse-paimon/src/main/java/org/apache/gravitino/catalog/lakehouse/paimon/GravitinoPaimonTable.java:
##########
@@ -137,21 +137,10 @@ private List<String> getPrimaryKeysFromIndexes(Index[] 
indexes) {
     if (indexes == null || indexes.length == 0) {
       return Collections.emptyList();
     }
-
     Preconditions.checkArgument(
         indexes.length == 1, "Paimon only supports no more than one Index.");
-
     Index primaryKeyIndex = indexes[0];
-    Arrays.stream(primaryKeyIndex.fieldNames())
-        .forEach(
-            filedName ->
-                Preconditions.checkArgument(
-                    filedName != null && filedName.length == 1,
-                    "The primary key columns should not be nested."));
-
-    return Arrays.stream(primaryKeyIndex.fieldNames())
-        .map(fieldName -> fieldName[0])
-        .collect(Collectors.toList());
+    return Arrays.stream(primaryKeyIndex.fieldNames()).map(e -> 
e[0]).collect(Collectors.toList());

Review Comment:
   comparing to `e`, `fieldName` is more meaningful.



-- 
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: commits-unsubscr...@gravitino.apache.org

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

Reply via email to