hqbhoho commented on code in PR #7852:
URL: https://github.com/apache/gravitino/pull/7852#discussion_r2262034059


##########
trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/catalog/jdbc/mysql/MySQLMetadataAdapter.java:
##########
@@ -174,6 +197,38 @@ private static String[][] 
convertIndexFieldNames(Set<String> fieldNames) {
     return fieldNames.stream().map(colName -> new String[] 
{colName}).toArray(String[][]::new);
   }
 
+  /**
+   * The auto-increment column will be verified. There can only be one 
auto-increment column and it
+   * must be the primary key or unique index.
+   *
+   * @param columns table auto increment columns
+   * @param indexes table indexes
+   */
+  protected static void validateIncrementCol(List<GravitinoColumn> columns, 
Index[] indexes) {
+    if (columns.size() > 1) {
+      throw new TrinoException(NOT_SUPPORTED, "Only one column can be 
auto-incremented in MySQL");
+    }

Review Comment:
   done



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