cambyzju commented on a change in pull request #8603:
URL: https://github.com/apache/incubator-doris/pull/8603#discussion_r834955922



##########
File path: fe/fe-core/src/main/java/org/apache/doris/analysis/ColumnDef.java
##########
@@ -283,11 +285,15 @@ public static void validateDefaultValue(Type type, String 
defaultValue) throws A
             case CHAR:
             case VARCHAR:
             case HLL:
-            case STRING:
                 if (defaultValue.length() > scalarType.getLength()) {
                     throw new AnalysisException("Default value is too long: " 
+ defaultValue);
                 }
                 break;
+            case STRING:

Review comment:
       if StringType length is MAX_STRING_LENGTH, your change is the same as 
before.
   if we set StringType length while create table, such as set to 100, the 
default value length should not bigger than 100, not MAX_STRING_LENGTH.




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

Reply via email to