StarRocks / starrocks

StarRocks, a Linux Foundation project, is a next-generation sub-second MPP OLAP database for full analytics scenarios, including multi-dimensional analytics, real-time analytics, and ad-hoc queries.
https://starrocks.io
Apache License 2.0
8.65k stars 1.75k forks source link

严格模式下导入数据超过该列长度限制,报错信息不正确 #33747

Open TeslaZY opened 10 months ago

TeslaZY commented 10 months ago

Steps to reproduce the behavior (Required)

  1. 在严格模式下进行数据导入
  2. CREATE TABLE card ( id int(11) NOT NULL COMMENT "", name varchar(64) NOT NULL COMMENT "", age int(11) NULL COMMENT "", addr varchar(64) NULL COMMENT "", grade int(11) NULL COMMENT "" ) ENGINE=OLAP PRIMARY KEY(id) DISTRIBUTED BY HASH(id) PROPERTIES ( "replication_num" = "1", "in_memory" = "false", "storage_format" = "DEFAULT", "enable_persistent_index" = "false", "replicated_storage" = "true", "compression" = "LZ4" );
  3. stream load方式导入数据,addr数据长度超过64,导入报错提示值为空

Expected behavior (Required)

报错提示为超出列长度限制

Real behavior (Required)

提示值为空

StarRocks version (Required)

3.0.5

github-actions[bot] commented 4 months ago

We have marked this issue as stale because it has been inactive for 6 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to StarRocks!

jaogoy commented 2 weeks ago

If you set strict_mode = true, the row with too long string field should be filtered, rather than setting the field to NULL. If you set strict_mode = fale, the too long string field will be converted to NULL, than it will throw the error you encounter.

You can check it.