eldenmoon commented on code in PR #46639:
URL: https://github.com/apache/doris/pull/46639#discussion_r1908480112
##########
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:
use exception to handle , should not return bool in
isSupportSchemaChangeForCharType
--
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]