You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/06/10 11:47:37 UTC

[GitHub] [iceberg] noneback opened a new issue, #5014: JDBC create iceberg_namespace_properties table failed in mysql 8.

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

   Error Log 
   ```
   [ERROR] Could not execute SQL statement. Reason:
   java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARCHAR(5500),value VARCHAR(5500),PRIMARY KEY (catalog_name, namespace, key))' at line 1
   ```
   It is possibly caused by DDL.
   
   [source code](https://github.com/apache/iceberg/blob/master/core/src/main/java/org/apache/iceberg/jdbc/JdbcUtil.java)
   if we translate the JAVA string to SQL:
   ```sql
   CREATE TABLE iceberg_namespace_properties ( 
     catalog_name  VARCHAR(255) NOT NULL,
     namespace   VARCHAR(255) NOT NULL,
     key  VARCHAR(5500),
     value VARCHAR(5500),
     PRIMARY KEY (catalog_name, namespace, key)
   );
   ```
   The `key` attribute has a conflict with SQL KEYWORD `key`.
   
   
   
   


-- 
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: issues-unsubscribe@iceberg.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] noneback commented on issue #5014: JDBC create iceberg_namespace_properties table failed in mysql 8.

Posted by GitBox <gi...@apache.org>.
noneback commented on issue #5014:
URL: https://github.com/apache/iceberg/issues/5014#issuecomment-1152590404

   > This could be a possible duplicate of: #4952
   
   Well then. But the `key` is  is too long in mysql 8 as a index key


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] noneback closed issue #5014: BUG: JDBC create iceberg_namespace_properties table failed in mysql 8.

Posted by GitBox <gi...@apache.org>.
noneback closed issue #5014: BUG: JDBC create iceberg_namespace_properties table failed in mysql 8.
URL: https://github.com/apache/iceberg/issues/5014


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] noneback commented on issue #5014: JDBC create iceberg_namespace_properties table failed in mysql 8.

Posted by GitBox <gi...@apache.org>.
noneback commented on issue #5014:
URL: https://github.com/apache/iceberg/issues/5014#issuecomment-1152275866

   By the way, `key` as a index key is too long in mysql 8


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] syun64 commented on issue #5014: JDBC create iceberg_namespace_properties table failed in mysql 8.

Posted by GitBox <gi...@apache.org>.
syun64 commented on issue #5014:
URL: https://github.com/apache/iceberg/issues/5014#issuecomment-1152583993

   This could be a possible duplicate of:
   https://github.com/apache/iceberg/issues/4952


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] noneback commented on issue #5014: JDBC create iceberg_namespace_properties table failed in mysql 8.

Posted by GitBox <gi...@apache.org>.
noneback commented on issue #5014:
URL: https://github.com/apache/iceberg/issues/5014#issuecomment-1154651022

   I will open another issue. Thanks for your reply.


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] kbendick commented on issue #5014: JDBC create iceberg_namespace_properties table failed in mysql 8.

Posted by GitBox <gi...@apache.org>.
kbendick commented on issue #5014:
URL: https://github.com/apache/iceberg/issues/5014#issuecomment-1154165069

   So the issue with the field being named `key` has been resolved.
   
   Do you have any reference, for example to MySQL documentation (and ideally Postgres documentation) that states what the field length limit is?
   
   You mentioned MySQL 8, but do you know which versions of MySQL are affected by this and does the latest version of MySQL fail due to the `varchar` size?
   
   That would be a helpful first step in finding a better size.
   
   We’d then need to update the code, and likely provide a path for users to upgrade (or some configuration field indicating to use the old style), depending on what RDBMS are affected.
   
   I’d ask, if possible, that you open a new issue focusing on just the field size limits, referencing this issue if possible. That way there’s less overhead for people reading it as the field name has been changed already.
   
   Thank you for reporting this @noneback!


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] noneback commented on issue #5014: JDBC create iceberg_namespace_properties table failed in mysql 8.

Posted by GitBox <gi...@apache.org>.
noneback commented on issue #5014:
URL: https://github.com/apache/iceberg/issues/5014#issuecomment-1152847406

   And it seems that the table initialization code also has some bugs. The error msg shows that it cannot create those non-existence tables as the code describing.
    We can change the `CREATE TABLE` to `CREATE TABLE IF NOT EXISTS`.


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] noneback closed issue #5014: JDBC create iceberg_namespace_properties table failed in mysql 8.

Posted by GitBox <gi...@apache.org>.
noneback closed issue #5014: JDBC create iceberg_namespace_properties table failed in mysql 8.
URL: https://github.com/apache/iceberg/issues/5014


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org