amorynan commented on code in PR #46639: URL: https://github.com/apache/doris/pull/46639#discussion_r1908949861
########## fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java: ########## @@ -888,12 +883,14 @@ public void checkSchemaChangeAllowed(Column other) throws DdlException { } } - if ((getDataType() == PrimitiveType.VARCHAR && other.getDataType() == PrimitiveType.VARCHAR) || ( - getDataType() == PrimitiveType.CHAR && other.getDataType() == PrimitiveType.VARCHAR) || ( - getDataType() == PrimitiveType.CHAR && other.getDataType() == PrimitiveType.CHAR)) { - if (getStrLen() > other.getStrLen()) { - throw new DdlException("Cannot shorten string length"); + // Nested types only support changing the order and increasing the length of the nested char type + // Char-type only support length growing + try { + if (!type.isSupportSchemaChangeForCharType(other.type)) { Review Comment: we should return true false in function to make logic right also should exception need -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org