yuqi1129 commented on code in PR #9821:
URL: https://github.com/apache/gravitino/pull/9821#discussion_r2761815596


##########
catalogs/catalog-jdbc-common/src/main/java/org/apache/gravitino/catalog/jdbc/converter/JdbcColumnDefaultValueConverter.java:
##########
@@ -61,7 +62,12 @@ public String fromGravitino(Expression defaultValue) {
       if (defaultValue.equals(Literals.NULL)) {
         return NULL;
       } else if (type instanceof Type.NumericType) {
-        return literal.value().toString();
+        // It seem that literals.value().toString() can be an empty string for 
numeric types

Review Comment:
   Before there will be a syntax error: 
   ```
   alter table t modify column `id` int null default ;
   ```
   
   after 
   ```
   mysql> alter table t modify column `id` int null default '';
   ERROR 1067 (42000): Invalid default value for 'id'
   ```
   
   The error message is expected, and a syntax error is not. (The result is for 
MySQL; other JDBC databases may behave differently)



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

Reply via email to