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


##########
catalogs/catalog-lakehouse-paimon/src/main/java/org/apache/gravitino/catalog/lakehouse/paimon/GravitinoPaimonTable.java:
##########
@@ -102,6 +121,77 @@ public static Transform[] 
toGravitinoPartitioning(List<String> partitionKeys) {
     return 
partitionKeys.stream().map(Transforms::identity).toArray(Transform[]::new);
   }
 
+  private static List<String> getPartitionKeys(Transform[] partitioning) {
+    if (partitioning == null) {
+      return Collections.emptyList();
+    }
+
+    return Arrays.stream(partitioning)
+        .map(
+            partition -> {
+              NamedReference[] references = partition.references();
+              Preconditions.checkArgument(
+                  references.length == 1, "Partitioning column must be 
single-column, like 'a'.");
+              return references[0].toString();
+            })
+        .collect(Collectors.toList());
+  }
+
+  private List<String> getPrimaryKeysFromIndexes(Index[] indexes) {
+    if (indexes == null || indexes.length == 0) {
+      return Collections.emptyList();
+    }
+
+    Preconditions.checkArgument(

Review Comment:
   this check seems to help better understand `Index primaryKeyIndex = 
indexes[0];`
   WDYT?



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