fix: Fixes the failure againt HEAD of CH server#1752
Conversation
| - clickhouse | ||
| container_name: clickhouse | ||
| image: clickhouse/clickhouse-server:25.11 | ||
| image: 'clickhouse/clickhouse-server:${CLICKHOUSE_VERSION-25.12-alpine}' |
There was a problem hiding this comment.
name of the variable contains version. It should be just ${CLICKHOUSE_VERSION} , right?
There was a problem hiding this comment.
+1 on this, what does this env value resolve to?
There was a problem hiding this comment.
t's not a typo. It's a way to set the default value if the ENV is not set (same as in bash)
https://docs.docker.com/compose/how-tos/environment-variables/variable-interpolation/#interpolation-syntax
I used just - instead of :- (like in bash) because it may be bit "surprise" for the user.
e.g:
I by mistake set CLICKHOUSE_VERSION="" (empty). But when I run docker-compose up it always picks the default value. I may get confuse why it's not picking the value I set.
Where as with current approach, it will take the "empty" value and try to pull the image -> which will fail -> immediate feedback that user made a mistake of setting "wrong" empty value.
I prefer to fail early and fast :)
Two changes: 1. We cannot use async_insert and quorum_insert settings together in latest CH 2. The Variant validation is more strict on Native format compared to 25.12 Related PRs on core 1. https://github.com/ClickHouse/ClickHouse/pull/89140/changes#diff-ff8ad4aed4cf07fe29cb5344d2ab79bc24efd97d054aa112c3a05b5ab853cc44R1558-R1562 2. https://github.com/ClickHouse/ClickHouse/pull/92843/changes Signed-off-by: Kaviraj <[email protected]>
That was original cause for Variant type exceeding nested types error. The check failed for 26.1 (major version >=25 but minor version less than 6) Thanks Paval from core team for catching this. Signed-off-by: Kaviraj <[email protected]>
781840f to
77375b8
Compare
lib/column/dynamic.go
Outdated
| func supportsFlatDynamicJSON(sc *ServerContext) bool { | ||
| return sc.VersionMajor >= 25 && sc.VersionMinor >= 6 | ||
| // Any CH version more than 25.6 | ||
| return sc.VersionMajor >= 25 || (sc.VersionMajor == 25 && sc.VersionMinor >= 6) |
There was a problem hiding this comment.
| return sc.VersionMajor >= 25 || (sc.VersionMajor == 25 && sc.VersionMinor >= 6) | |
| return sc.VersionMajor > 25 || (sc.VersionMajor == 25 && sc.VersionMinor >= 6) |
There was a problem hiding this comment.
Otherwise any 25 major version will pass the check
Signed-off-by: Kaviraj <[email protected]>
Summary
Two changes:
supportsFlatDynamicJSONwas buggy. Causing it to return false for version26.1 (major >=25, but minor <6) (Thanks @Avogar for catching the bug 🙇 )Related PRs on core
Should fix the periodic tests running against current CH head (after 25.12)
Before
After
Checklist
Delete items not relevant to your PR: