mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Merge pull request #60258 from den-crane/tests/issue_60223
test for #60223
This commit is contained in:
commit
2961696574
10
tests/queries/0_stateless/02983_empty_map_hasToken.reference
Normal file
10
tests/queries/0_stateless/02983_empty_map_hasToken.reference
Normal file
@ -0,0 +1,10 @@
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
27
tests/queries/0_stateless/02983_empty_map_hasToken.sql
Normal file
27
tests/queries/0_stateless/02983_empty_map_hasToken.sql
Normal file
@ -0,0 +1,27 @@
|
||||
-- https://github.com/ClickHouse/ClickHouse/issues/60223
|
||||
|
||||
CREATE TABLE test
|
||||
(
|
||||
t String,
|
||||
id String,
|
||||
h Map(String, String)
|
||||
)
|
||||
ENGINE = MergeTree
|
||||
ORDER BY (t, id) SETTINGS index_granularity = 4096 ;
|
||||
|
||||
insert into test values ('xxx', 'x', {'content-type':'text/plain','user-agent':'bulk-tests'});
|
||||
insert into test values ('xxx', 'y', {'content-type':'application/json','user-agent':'bulk-tests'});
|
||||
insert into test select 'xxx', number, map('content-type', 'x' ) FROM numbers(1e2);
|
||||
|
||||
optimize table test final;
|
||||
|
||||
SELECT count() FROM test PREWHERE hasToken(h['user-agent'], 'bulk') WHERE hasToken(h['user-agent'], 'tests') and t = 'xxx';
|
||||
SELECT count() FROM test PREWHERE hasToken(h['user-agent'], 'tests') WHERE hasToken(h['user-agent'], 'bulk') and t = 'xxx';
|
||||
SELECT count() FROM test WHERE hasToken(h['user-agent'], 'bulk') and hasToken(h['user-agent'], 'tests') and t = 'xxx';
|
||||
SELECT count() FROM test PREWHERE hasToken(h['user-agent'], 'bulk') and hasToken(h['user-agent'], 'tests') and t = 'xxx';
|
||||
SELECT count() FROM test PREWHERE hasToken(h['user-agent'], 'bulk') and hasToken(h['user-agent'], 'tests') WHERE t = 'xxx';
|
||||
SELECT count() FROM test PREWHERE hasToken(h['user-agent'], 'tests') and hasToken(h['user-agent'], 'bulk') WHERE t = 'xxx';
|
||||
SELECT count() FROM test PREWHERE hasToken(h['user-agent'], 'tests') and hasToken(h['user-agent'], 'bulk');
|
||||
SELECT count() FROM test PREWHERE hasToken(h['user-agent'], 'bulk') and hasToken(h['user-agent'], 'tests');
|
||||
SELECT count() FROM test WHERE hasToken(h['user-agent'], 'tests') and hasToken(h['user-agent'], 'bulk');
|
||||
SELECT count() FROM test WHERE hasToken(h['user-agent'], 'bulk') and hasToken(h['user-agent'], 'tests');
|
Loading…
Reference in New Issue
Block a user