loleek opened a new issue, #6332:
URL: https://github.com/apache/iceberg/issues/6332

   ### Apache Iceberg version
   
   1.1.0 (latest release)
   
   ### Query engine
   
   _No response_
   
   ### Please describe the bug 🐞
   
   When I use jdbc catalog with mysql backend in flink test case, the create 
catalog operation return an error.
   
   >Flink SQL> CREATE CATALOG iceberg_catalog WITH (
   >   'type'='iceberg',
   >   'catalog-impl'='org.apache.iceberg.jdbc.JdbcCatalog',
   >   'catalog-name' = 'iceberg_catalog',
   >   'warehouse' = 'file:///path/to/warehouse',
   >   'uri' = 'jdbc:mysql://host:port/iceberg_catalog',
   >   'jdbc.user' = 'root',
   >   'jdbc.password' = 'passwd');
   [ERROR] Could not execute SQL statement. Reason:
   com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was 
too long; max key length is 767 bytes.
   
   I think the root cause is here 
https://github.com/apache/iceberg/blob/master/core/src/main/java/org/apache/iceberg/jdbc/JdbcUtil.java#L179
 which use CATALOG_NAME VARCHAR(255) + NAMESPACE_NAME VARCHAR(255) + 
NAMESPACE_PROPERTY_KEY VARCHAR(5500) as primary key.
   
   Here is a related issue https://github.com/apache/iceberg/pull/2778/files, 
which fix CREATE_CATALOG_TABLE statement.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to