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


##########
flink-connector/flink/src/main/java/org/apache/gravitino/flink/connector/catalog/BaseCatalog.java:
##########
@@ -521,6 +552,11 @@ protected CatalogBaseTable toFlinkTable(Table table) {
           .column(column.name(), column.nullable() ? flinkType.nullable() : 
flinkType.notNull())
           .withComment(column.comment());
     }
+    Index[] indices = table.index();
+    if (indices != null && indices.length == 1) {

Review Comment:
   So .... this means the primary key always has a SINGLE column, right?



##########
flink-connector/flink/src/main/java/org/apache/gravitino/flink/connector/catalog/BaseCatalog.java:
##########
@@ -289,6 +308,18 @@ public void createTable(ObjectPath tablePath, 
CatalogBaseTable table, boolean ig
     }
   }
 
+  private static Index[] getIndices(ResolvedCatalogBaseTable<?> resolvedTable) 
{
+    Optional<UniqueConstraint> primaryKey = 
resolvedTable.getResolvedSchema().getPrimaryKey();
+    List<String> primaryColumns = 
primaryKey.map(UniqueConstraint::getColumns).orElse(null);
+    if (primaryColumns == null) {
+      return new Index[0];
+    }
+    String[][] primaryFiled =

Review Comment:
   ```suggestion
       String[][] primaryField =
   ```



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