Query Cache: Try to fix bad cast from ColumnConst to ColumnVector<char8_t>#50704
Conversation
|
This is an automated comment for commit a9f1393 with description of existing statuses. It's updated for the latest CI running
|
|
LGTM, but the tests have failed. Please fix the tests first. Also,
please add a new test. |
|
@rschu1ze add a test plz. |
|
Please add a test. |
|
Sorry, this PR got a bit rusty. Checking again locally now, in my first try two weeks ago I could not find a repro. |
|
It's ok to add a test that could only occasionally reproduce the issue. |
|
Update: As the original issue happened (sporadically) during stress testing, I isolated the bad query + test case, and ran it with query cache enabled + custom settings from the stress test overnight in a loop. Didn't reproduce and no other repro exists right now 😞 There were a few new issues in CI:
|
…r8_t> Resolves ClickHouse#49445 The query cache buffers query result chunks and eventually squashes them before insertion into the cache. Here, squashing failed because not all chunks were of the same type. Looks like chunks of the same underlying type (e.g. UInt8) in a query result be of mixed const, sparse or low-cardinality type. Fix this by always materializing the data regardless of the compression. Strange thing is that the failing query in the stress test (*) isn't able to reproduce the bug, and I haven't managed to trigger the issue otherwise, so no test case is added. (*) SELECT 1 UNION ALL SELECT 1 INTERSECT SELECT 1 E.g. here: https://s3.amazonaws.com/clickhouse-test-reports/0/18817517ed6f8849e3d979e10fbb273e0edf0eaa/stress_test__debug_/fatal_messages.txt
4daba82 to
a9f1393
Compare
|
ClickHouse Integration Tests (asan) [4/6]:
ClickHouse Stateless Tests (release, Wide Parts Enabled):
ClickHouse Bugfix Validate Check for PR:
|
…Const to ColumnVector<char8_t>
Backport #50704 to 23.5: Query Cache: Try to fix bad cast from ColumnConst to ColumnVector<char8_t>
Hopefully resolves #49445
The query cache buffers query result chunks and eventually squashes them before insertion into the cache. Here, squashing failed because not all chunks were of the same type. Looks like chunks of the same underlying type (e.g. UInt8) in a query result can be of mixed const, sparse or low-cardinality type. Fixed this by always materializing the data regardless of the compression. Strange thing is that the failing query in the stress test (*) isn't able to reproduce the bug, and I haven't managed to trigger the issue otherwise --> no test case added.
(*)
SELECT 1 UNION ALL SELECT 1 INTERSECT SELECT 1, hereChangelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix assert in query cache with mixed const/non-const result chunks