predator4ann commented on code in PR #6657: URL: https://github.com/apache/gravitino/pull/6657#discussion_r2218444248
########## docs/jdbc-mysql-catalog.md: ########## @@ -54,6 +54,34 @@ Besides the [common catalog properties](./gravitino-server-config.md#apache-grav You must download the corresponding JDBC driver to the `catalogs/jdbc-mysql/libs` directory. ::: +### Driver Version Compatibility + +The MySQL catalog includes driver version compatibility checks for datetime precision calculation: + +- **MySQL Connector/J versions >= 8.0.16**: Full support for datetime precision calculation +- **MySQL Connector/J versions < 8.0.16**: Limited support - datetime precision calculation returns `null` with a warning log + +This limitation affects the following datetime types: +- `TIME(p)` - time precision +- `TIMESTAMP(p)` - timestamp precision +- `DATETIME(p)` - datetime precision + +When using an unsupported driver version, the system will: +1. Continue to work normally with default precision (0) +2. Log a warning message indicating the driver version limitation +3. Return `null` for precision calculations to avoid incorrect results + +**Example warning log:** +``` +WARN: MySQL driver version mysql-connector-java-8.0.11 is below 8.0.16, +columnSize may not be accurate for precision calculation. +Returning null for TIMESTAMP type precision. Driver version: mysql-connector-java-8.0.11 +``` + +**Recommended driver versions:** +- `mysql-connector-java-8.0.16` or higher +- `mysql-connector-java-8.0.26` (default in Gravitino integration tests) 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]
