[Feature](multi-catalog) Truncate char or varchar columns if size is smaller than file columns or not found in the file column schema. (#22318)

Truncate char or varchar columns if size is smaller than file columns or not found in the file column schema by session var `truncate_char_or_varchar_columns`.
This commit is contained in:
Qi Chen
2023-08-10 14:37:20 +08:00
committed by GitHub
parent f1db6bd8c1
commit f2658dc7bd
14 changed files with 308 additions and 9 deletions

View File

@ -517,7 +517,9 @@ public class ScalarType extends Type {
}
public static ScalarType createVarcharType() {
return DEFAULT_VARCHAR;
// Because ScalarType is not an immutable class, it will call setLength() sometimes.
// So currently don't use DEFAULT_VARCHAR, will improve it in the future.
return new ScalarType(PrimitiveType.VARCHAR);
}
public static ScalarType createHllType() {