apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
12.81k stars 3.3k forks source link

[Bug] [branch-2.1] When enable_nereids_dml is set to true, the value of a varchar column is truncated if the length of the column's value is greater than the schema length for that column #35442

Open kobe6th opened 6 months ago

kobe6th commented 6 months ago

Search before asking

Version

2.1.2

What's Wrong?

When enable_nereids_dml is set to true, the value of a varchar column is truncated if the length of the column's value is greater than the schema length for that column

CREATE TABLEtest_tbl( k1varchar(32) NOT NULL, v1varchar(10) NOT NULL, ) ENGINE=OLAP DUPLICATE KEY(k1) COMMENT 'OLAP' DISTRIBUTED BY HASH(k1`) BUCKETS 1 PROPERTIES ( "replication_allocation" = "tag.location.default: 1" );

insert into test_tbl values('1111', '232323232323232323232323232323'); `

enable_nereids_dml=false MySQL [test]> insert into test_tbl values('1111', '232323232323232323232323232323');ERROR 5025 (HY000): Insert has filtered data in strict mode, tracking_url=http://10.0.0.1:8040/api/_load_error_log?file=__shard_1/error_log_insert_stmt_7867960850274d9f-9b17d214d2fbe6a0_7867960850274d9f_9b17d214d2fbe6a0

enable_nereids_dml=true ` MySQL [test]> insert into test_tbl values('1111', '232323232323232323232323232323'); Query OK, 1 row affected (0.08 sec) {'label':'label_e19a4fff87f24bd9_ac7e74bd9baa9e6b', 'status':'VISIBLE', 'txnId':'3008'}

MySQL [test]> select * from test_tbl; +------+------------+ | k1 | v1 | +------+------------+ | 1111 | 2323232323 | +------+------------+ `

What You Expected?

fix this bug

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

Code of Conduct

ixzc commented 6 months ago

we will fix it