predator4ann commented on code in PR #6657:
URL: https://github.com/apache/gravitino/pull/6657#discussion_r2218442157
##########
catalogs/catalog-jdbc-mysql/src/main/java/org/apache/gravitino/catalog/mysql/converter/MysqlColumnDefaultValueConverter.java:
##########
@@ -49,7 +54,8 @@ public Expression toGravitino(
}
if (isExpression) {
- if (columnDefaultValue.equals(CURRENT_TIMESTAMP)) {
+ if (columnDefaultValue.equals(CURRENT_TIMESTAMP)
+ || columnDefaultValue.startsWith(CURRENT_TIMESTAMP + "(")) {
Review Comment:
done
##########
catalogs/catalog-jdbc-mysql/src/main/java/org/apache/gravitino/catalog/mysql/converter/MysqlColumnDefaultValueConverter.java:
##########
@@ -88,10 +94,17 @@ public Expression toGravitino(
return Literals.timeLiteral(LocalTime.parse(columnDefaultValue,
DATE_TIME_FORMATTER));
case JdbcTypeConverter.TIMESTAMP:
case MysqlTypeConverter.DATETIME:
- return CURRENT_TIMESTAMP.equals(columnDefaultValue)
- ? DEFAULT_VALUE_OF_CURRENT_TIMESTAMP
- : Literals.timestampLiteral(
- LocalDateTime.parse(columnDefaultValue, DATE_TIME_FORMATTER));
+ if (CURRENT_TIMESTAMP.equals(columnDefaultValue)
+ || columnDefaultValue.startsWith(CURRENT_TIMESTAMP + "(")) {
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]