【已解决】2.1.1,倒排索引字段查询结果不一致

Viewed 63

count查不出数据,列表可以查出数据。
版本是2.1.1

建表语句

CREATE TABLE `test_ad` (
	`id` VARCHAR ( 100 ) NULL COMMENT '',
	`c1` VARCHAR ( 100 ) NULL COMMENT '',
	`c2` VARCHAR ( 100 ) NULL COMMENT '',
	`c3` VARCHAR ( 20 ) NULL COMMENT '',
	INDEX idx_test_001 ( `c1` ) USING INVERTED COMMENT '',
	INDEX idx_test_002 ( `c2` ) USING INVERTED COMMENT '',
	INDEX idx_test_003 ( `c3` ) USING INVERTED COMMENT '' 
	) ENGINE = OLAP UNIQUE KEY ( `id` ) COMMENT '测试' 
	DISTRIBUTED BY HASH ( `id` ) BUCKETS 10 
	PROPERTIES (
	"replication_allocation" = "tag.location.default: 1",
"enable_unique_key_merge_on_write" = "true" 
)

insert into test_ad VALUES ('1','1','1','110100000000'),
('2','2','2','110101000000'),
('3','3','3','1101011C0100')

查询语句

select * from test_ad where c3 like '11%' and c3 = '110101000000'结果:
1718101915177.jpg

select count(*) from test_ad where c3 like '11%' and c3 = '110101000000'结果:
1718101936205.jpg

1 Answers

感谢反馈!
本地2.1.3跑这个demo正常,应该是在2.1.2~2.1.3期间的版本中有fix;
可以升级至最新的2.1.3 release版本,更稳定些。