zy-kkk commented on code in PR #40122: URL: https://github.com/apache/doris/pull/40122#discussion_r1773665867
########## fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/client/JdbcMySQLClient.java: ########## @@ -374,11 +377,11 @@ private Type dorisTypeToDoris(String type) { return ScalarType.createDatetimeV2Type(scale); } case "CHAR": - case "VARCHAR": { - int length = Integer.parseInt(upperType.substring(openParen + 1, upperType.length() - 1)); - return baseType.equals("CHAR") - ? ScalarType.createCharType(length) : ScalarType.createVarcharType(length); - } + ScalarType charType = ScalarType.createType(PrimitiveType.CHAR); + charType.setLength(fieldSchema.getColumnSize().orElse(0)); + return charType; + case "VARCHAR": + return ScalarType.createVarcharType(fieldSchema.getColumnSize().orElse(0)); Review Comment: Thanks for finding this problem. The processing here is not appropriate, so I changed the behavior here, refer to https://github.com/apache/doris/pull/41243 -- 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