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


##########
catalogs/catalog-jdbc-common/src/main/java/org/apache/gravitino/catalog/jdbc/operation/JdbcTableOperations.java:
##########
@@ -95,6 +100,79 @@ public void initialize(
     this.columnDefaultValueConverter = jdbcColumnDefaultValueConverter;
   }
 
+  protected String calculateDefaultValue(JdbcColumn column, Expression 
defaultValueExpression) {

Review Comment:
   >  Could you please add some example comments to clarify the code logic? The 
current implementation is difficult to understand.
   
   Let me add more comments to explain the logic.



##########
catalogs/catalog-jdbc-common/src/main/java/org/apache/gravitino/catalog/jdbc/operation/JdbcTableOperations.java:
##########
@@ -95,6 +100,79 @@ public void initialize(
     this.columnDefaultValueConverter = jdbcColumnDefaultValueConverter;
   }
 
+  protected String calculateDefaultValue(JdbcColumn column, Expression 
defaultValueExpression) {

Review Comment:
   I'm afraid that the logic does not belong to `columnDefaultValueConverter`. 
As the root cause of this problem is that we do not quote an empty string value 
when concatenating SQL.  
   
   The result value of `columnDefaultValueConverter` is correct, and it's the 
string value quoting issue that cause the problem. 



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