We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apache-doris-2.1.3-bin-x64
这是原表,包含了char(255)类型的字段
CREATE TABLE test_doris_huan_hang ( `id` INT NOT NULL, `name` CHAR(255), `address` VARCHAR(8000), `updt_time` DATETIME, `money` DECIMAL(16,4), `double_test` DECIMAL(16,2) NOT NULL, `float_test` DECIMAL(16,2), `log_text` STRING ) UNIQUE KEY(`id`) DISTRIBUTED BY HASH(`id`) BUCKETS AUTO PROPERTIES ( "replication_num" = "3", "light_schema_change" = "true" );
使用create table like创建新表
CREATE TABLE `temp_d8fd87d7cc814c1c` LIKE test_doris_huan_hang;
使用show create table发现,新创建的表的char长度变为了1,导致插入数据时报错
CREATE TABLE `temp_d8fd87d7cc814c1c` ( `id` INT NOT NULL, `name` CHAR(1) NULL, `address` VARCHAR(8000) NULL, `updt_time` DATETIME NULL, `money` DECIMAL(16, 4) NULL, `double_test` DECIMAL(16, 2) NOT NULL, `float_test` DECIMAL(16, 2) NULL, `log_text` TEXT NULL ) ENGINE=OLAP UNIQUE KEY(`id`) COMMENT 'OLAP' DISTRIBUTED BY HASH(`id`) BUCKETS AUTO PROPERTIES ( "replication_allocation" = "tag.location.default: 3", "min_load_replica_num" = "-1", "is_being_synced" = "false", "storage_medium" = "hdd", "storage_format" = "V2", "inverted_index_storage_format" = "V1", "enable_unique_key_merge_on_write" = "true", "light_schema_change" = "true", "disable_auto_compaction" = "false", "enable_single_replica_compaction" = "false", "group_commit_interval_ms" = "10000", "group_commit_data_bytes" = "134217728" );
并且我测试char(254)就没有问题,只要长度小于255都不会出错,请问这是数据库的问题吗?麻烦查看下,谢谢!
执行create table like需要能正确创建表结构
按照上面的描述可复现
No response
The text was updated successfully, but these errors were encountered:
reproduced.
Sorry, something went wrong.
morrySnow
Successfully merging a pull request may close this issue.
Search before asking
Version
apache-doris-2.1.3-bin-x64
What's Wrong?
这是原表,包含了char(255)类型的字段
使用create table like创建新表
使用show create table发现,新创建的表的char长度变为了1,导致插入数据时报错
并且我测试char(254)就没有问题,只要长度小于255都不会出错,请问这是数据库的问题吗?麻烦查看下,谢谢!
What You Expected?
执行create table like需要能正确创建表结构
How to Reproduce?
按照上面的描述可复现
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: