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'
结果:
select count(*) from test_ad where c3 like '11%' and c3 = '110101000000'
结果: