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

Support Array(LowCardinality(String)) for Bloom Filter #7826

Closed
volfco opened this issue Nov 18, 2019 · 2 comments · Fixed by #48697
Closed

Support Array(LowCardinality(String)) for Bloom Filter #7826

volfco opened this issue Nov 18, 2019 · 2 comments · Fixed by #48697
Labels
comp-arrays Arrays / array joins / higher order comp-lowcardinality LowCardinality data type comp-skipidx Data skipping indices feature

Comments

@volfco
Copy link

volfco commented Nov 18, 2019

Use case
To save space I have a table with a large Array column (because I can't dynamically create columns when using the Kafka table engine) with a type of LowCardinality(String).

Altering this table to use a bloom filter index results in the following error:
Unexpected type Array(LowCardinality(String)) of bloom filter index..

Describe the solution you'd like
Support for bloom filter indexes on columns with the Array(LowCardinality(String)) type

@volfco volfco added the feature label Nov 18, 2019
@filimonov filimonov added comp-arrays Arrays / array joins / higher order comp-lowcardinality LowCardinality data type comp-skipidx Data skipping indices labels Nov 18, 2019
@makeavish
Copy link

Is it going to be picked anytime soon?

@darkleaf
Copy link

It works on 22.3.

CREATE TABLE x
(
    `foo` Array(LowCardinality(String)),
    INDEX idx foo TYPE bloom_filter GRANULARITY 1
)
ENGINE = MergeTree
PRIMARY KEY tuple()

Query id: 50d364b8-77c8-4cd5-afa0-5ff8933d3932

Ok.

0 rows in set. Elapsed: 0.063 sec. 
insert into x values (['a', 'b']);

INSERT INTO x FORMAT Values

Query id: d5b3cbbd-c91e-487b-bd25-20cd9ab37289

Ok.

1 rows in set. Elapsed: 0.087 sec. 
SELECT *
FROM x

Query id: 0b054751-289f-4163-8c0a-46dabb1a0e15

┌─foo───────┐
│ ['a','b'] │
└───────────┘

1 rows in set. Elapsed: 0.050 sec. 
SELECT *
FROM system.data_skipping_indices
WHERE table = 'x'

Query id: 6fe12741-594f-4bd8-8661-a8b053aad869

┌─database───┬─table─┬─name─┬─type─────────┬─expr─┬─granularity─┬─data_compressed_bytes─┬─data_uncompressed_bytes─┬─marks─┐
│ gmonit-dev │ x     │ idx  │ bloom_filter │ foo  │           1 │                    28 │                       2 │    24 │
└────────────┴───────┴──────┴──────────────┴──────┴─────────────┴───────────────────────┴─────────────────────────┴───────┘

rschu1ze added a commit that referenced this issue Apr 12, 2023
rschu1ze added a commit that referenced this issue Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-arrays Arrays / array joins / higher order comp-lowcardinality LowCardinality data type comp-skipidx Data skipping indices feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants