[Fix](Planner) fix varchar does not show real length (#25171)
Problem: when we create table with datatype varchar(), we regard it to be max length by default. But when we desc, it does not show real length but show varchar() Reason: when we upgrade version from 2.0.1 to 2.0.2, we support new feature of creating varchar(), and it shows the same way with ddl schema. So user would confuse of the length of varchar Solved: change the showing of varchar() to varchar(65533), which in compatible with hive
This commit is contained in:
@ -598,7 +598,7 @@ public class ScalarType extends Type {
|
||||
return "TIMEV2(" + scale + ")";
|
||||
} else if (type == PrimitiveType.VARCHAR) {
|
||||
if (isWildcardVarchar()) {
|
||||
return "VARCHAR(*)";
|
||||
return "VARCHAR(" + MAX_VARCHAR_LENGTH + ")";
|
||||
}
|
||||
return "VARCHAR(" + len + ")";
|
||||
} else if (type == PrimitiveType.STRING) {
|
||||
|
||||
Reference in New Issue
Block a user