Optimising has(), indexOf(), and countEqual() for Array(LowCardinality(T)) and constant right arguments#12550
Optimising has(), indexOf(), and countEqual() for Array(LowCardinality(T)) and constant right arguments#12550alexey-milovidov merged 70 commits intoClickHouse:masterfrom myrrc:bug/low-cardinality-arrays-optimisations
Conversation
|
Known caveats (why this PR is still a draft): Steps to reproduce: |
Enmk
left a comment
There was a problem hiding this comment.
Needs a better changelog entry, like:
optimized has(), indexOf(), and countEqual() for columns of
Array(LowCardinality(X))types (whereXcan beNullableor any other combination of types).
Needs some tests: stateless SQL-tests and performance-tests
There are also some questionable constructs here and there, please see comments inline.
…ty-arrays-optimisations
target value correctly
|
Resolves #13917 |
|
Resolves #10880 ? |
Yes, the perf tests showed the speedup with right-hand constant arguments. |
|
Probably added regression for queries like:
With exception:
|
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Optimize
has(),indexOf()andcountEqual()functions forArray(LowCardinality(T))and constant right arguments.The
arrayIndex.hholding aforementioned functions doesn't have the specialization forArray(LowCardinality(T))arguments, so they are converted to ordinary columns, which disables the ability to search in their dictionary (useful for constant right arguments).Also fixes the unsigned insert/select bug, see the test (inserting -1 into unsigned columns) for detail.
Resolves #6005
Resolves #13392
Resolves #13917
Resolves #10880
Resolves #13576