openinx commented on a change in pull request #2778:
URL: https://github.com/apache/iceberg/pull/2778#discussion_r665859255
##########
File path: core/src/main/java/org/apache/iceberg/jdbc/JdbcUtil.java
##########
@@ -42,11 +42,11 @@
protected static final String CREATE_CATALOG_TABLE =
"CREATE TABLE " + CATALOG_TABLE_NAME +
"(" +
- CATALOG_NAME + " VARCHAR(1255) NOT NULL," +
- TABLE_NAMESPACE + " VARCHAR(1255) NOT NULL," +
- TABLE_NAME + " VARCHAR(1255) NOT NULL," +
- METADATA_LOCATION + " VARCHAR(32768)," +
- PREVIOUS_METADATA_LOCATION + " VARCHAR(32768)," +
+ CATALOG_NAME + " VARCHAR(255) NOT NULL," +
+ TABLE_NAMESPACE + " VARCHAR(255) NOT NULL," +
+ TABLE_NAME + " VARCHAR(255) NOT NULL," +
+ METADATA_LOCATION + " VARCHAR(5500)," +
+ PREVIOUS_METADATA_LOCATION + " VARCHAR(5500)," +
"PRIMARY KEY (" + CATALOG_NAME + ", " + TABLE_NAMESPACE + ", " +
TABLE_NAME + ")" +
Review comment:
I think the reason to choose 255 for the size of `CATALOG_NAME`,
`TABLE_NAMESPACE`, `TABLE_NAME` is : we are composting the three into a
primary key, and the primary key size is limited by 767 ( 255 * 3 = 765 < 767).
Okay, that sounds good to me.
--
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]