whutpencil commented on a change in pull request #8603:
URL: https://github.com/apache/incubator-doris/pull/8603#discussion_r834985813
##########
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:
The length cannot be specified when creating a string type field. The
default is the maximum length.
This is also to avoid modifying the allowable length of string type in other
places. If you debug your own local code, you will find that the maximum
allowable length of string has become 1.
--
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]