1、版本:doris-2.1.4-rc03-e93678fd1e
2、表:聚合表
3、指标字段:DECIMAL(20, 5)
4、tvf来源:s3 parquet文件
现象(插入报warning):
INSERT INTO xx WITH LABEL xx (xxx,xxx) SELECT * FROM s3("uri"="s3://xx/*.parquet","s3.endpoint"="s3.us-east-1.amazonaws.com","s3.region"="us-east-1","s3.access_key"="xxx","s3.secret_key"="xxx","format"="parquet");
waring内容:Reason: column_name[xxx], decimal value is not valid for definition, value=491587282820285841014796, precision=20, scale=5, min=-99999999999999999999, max=99999999999999999999; . src line [];
实际在parquet文件里面这个字段范围并未超长:
| max(xxx) | min(xxx) |
+------------------------+------------------------+
| 66.97523 | 0.00000 |
+------------------------+------------------------+
成功写入场景1(去掉column指定):
INSERT INTO xx WITH LABEL xx SELECT * FROM s3("uri"="s3://xx/*.parquet","s3.endpoint"="s3.us-east-1.amazonaws.com","s3.region"="us-east-1","s3.access_key"="xxx","s3.secret_key"="xxx","format"="parquet");
成功写入场景2(增加字段长度,重建表 or alter):
decimal(20,5) 改为 decimal(21,5)
成功写入场景3(缩小字段长度,重建表):
decimal(20,5) 改为 decimal(19,5)