【详述】Starrocks v3.1.0 where 过滤结果不正确。
【背景】在做starrocks v3.1.0 升级测试,发现和 v3.0.x 系列查询结果不一致,影响正常的业务
【业务影响】decimal 查询结果不对,影响正常的业务
【StarRocks版本】 3.1.0-1778465
【集群规模】例如:1fe+3be(fe与be独立部署)
【机器信息】CPU虚拟核/内存/网卡,例如:32C/128G/千兆
【附件】
1.建一个测试表,如下是建表语句:
create table sr_tmp_test (
id bigint NOT NULL,
v2 tinyint NULL,
v1 DECIMAL(12, 4) DEFAULT "10.5"
) PRIMARY KEY (id)
DISTRIBUTED BY HASH(id)
PROPERTIES (
"replication_num" = "3",
"enable_persistent_index" = "true"
);
2. 插入一下测试数据
insert into sr_tmp_test (id, v1, v2) values (1, 12.345, 0), (2, 12.3450, 0), (3, 12.3000, 0);
3. 使用starrocks v3.0.3 fe5e3a1 查询结果如下:
select count(distinct id) from sr_tmp_test where v1='12.345';
-- result: 2
select count(distinct id) from sr_tmp_test where v1='12.3450';
-- result: 2
select count(distinct id) from sr_tmp_test where v1=12.345;
-- result: 2
select count(distinct id) from sr_tmp_test where v1=12.3450;
-- result: 2
以上结果,是符合业务预期的。
4. 使用starrocks 3.1.0-1778465 查询结果如下:
select count(distinct id) from sr_tmp_test where v1='12.345';
-- result: 0
select count(distinct id) from sr_tmp_test where v1='12.3450';
-- result: 2
select count(distinct id) from sr_tmp_test where v1=12.345;
-- result: 2
select count(distinct id) from sr_tmp_test where v1=12.3450;
-- result: 2
以上结果,第一个case 结果和 starrocks v3.0.3 结果不一致,而且也是不正确的。请问这个是不是个BUG, 预计会在哪个版本修复?