Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skipping index of Bloom filter for IPv6 type stops working after upgrade from 22.6 to 23.12 #58885

Closed
ywangtht opened this issue Jan 16, 2024 · 0 comments · Fixed by #59127
Closed

Comments

@ywangtht
Copy link

On ClickHouse 22.6:

CREATE TABLE test
(
    `ip` IPv6,
    INDEX index_ip_bloom_filter ip TYPE bloom_filter GRANULARITY 5
)
ENGINE = MergeTree
ORDER BY tuple()
SETTINGS index_granularity = 8192


insert into test select concat('::ffff:', IPv4NumToString(toUInt32(rand(number)%20+180000000))) from system.numbers limit 3000000


SELECT count()
FROM test
WHERE toIPv6('::ffff:10.186.149.4') = ip
SETTINGS use_skip_indexes = 0

Query id: 4a0220f7-b453-4ac0-9b7e-25bb3860aba3

┌─count()─┐
│  149610 │
└─────────┘

SELECT count()
FROM test
WHERE toIPv6('::ffff:10.186.149.4') = ip
SETTINGS use_skip_indexes = 1

Query id: f5d21504-d600-4260-bba5-76f5595e07e6

┌─count()─┐
│  149610 │
└─────────┘

Upgrade to 23.12 and query the old data generated in 22.6:

SELECT count()
FROM test
WHERE toIPv6('::ffff:10.186.149.4') = ip
SETTINGS use_skip_indexes = 0

Query id: 4a0220f7-b453-4ac0-9b7e-25bb3860aba3

┌─count()─┐
│  149610 │
└─────────┘

SELECT count()
FROM test
WHERE toIPv6('::ffff:10.186.149.4') = ip
SETTINGS use_skip_indexes = 1

Query id: f5d21504-d600-4260-bba5-76f5595e07e6

┌─count()─┐
│  0 │
└─────────┘

I thought this bug was fixed by #57707 but it appears not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants