fix: chdb-core 26.5.0 compatibility — composite leaf coercion, PK paren strip, inverted upstream-bug locks#12
Merged
ShawnChen-Sirius merged 1 commit intoJun 13, 2026
Conversation
…en strip, inverted upstream-bug locks
chdb-core 26.5.0 (the ClickHouse 26.5 baseline, on PyPI 2026-06-08)
changed three behaviors vs 26.3 and turned the nightly CI red:
1. Float / Decimal / temporal leaves inside Array / Tuple / Map /
Nested / geo cells are now serialised as quoted strings
("['1.5', '2.5']" for Array(Float64)) where 26.3 emitted bare
numerics. The cursor wrapper now walks composite cells recursively,
driven by the column's ClickHouse type string, and re-coerces
leaves to native types. Container shapes are preserved as parsed;
named Tuple cells (returned as dicts by chdb.dbapi) keep the dict
shape with coerced values.
2. ClickHouse 26.5 preserves wrapping parens around a single-column
sorting key in system.tables.sorting_key (ORDER BY (user_id) used
to be reported as user_id), which broke get_pk_constraint with
constrained_columns=['(user_id)']. Reflection now strips parens
that wrap the entire expression before splitting.
3. chdb-core 26.5 fixed the two upstream bugs our torture tests
locked: Decimal(P>18) precision loss (chdb-io/chdb#574) and Float
NaN/±Inf folding to None (chdb-io/chdb#575). Both locks are
inverted to assert the fixed behavior, as their failure messages
prescribed.
The L5 differential reference binary moves from
clickhouse-server:26.3.9.8-lts to clickhouse-server:26.5.1.882 to
match the new baseline; the version-skew sanity test guards the
pairing.
All cursor coercions are no-ops on chdb-core 26.3 native values, so
the wrapper works on both binary generations. New torture tests lock
the leaf repair for each composite shape that regressed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Nightly CI has been red since 2026-06-08, when
chdb-core 26.5.0(the ClickHouse 26.5 baseline) landed on PyPI and replaced 26.3. The last green run (2026-06-07) used chdb-core 26.3.0. Three behavior changes between the two cores broke the suite.What changed in chdb-core 26.5 (and how we adapt)
1. Composite cells lost numeric typing. The new binary serialises Float / Decimal / temporal leaves inside
Array/Tuple/Map/Nested/ geo cells as quoted strings —"['1.5', '2.5']"forArray(Float64)— where 26.3 emitted bare numerics._cursor.pynow walks composite cells recursively, driven by the column's ClickHouse type string, and re-coerces leaves to nativefloat/Decimal/int/date/datetime/time. Container shapes are preserved exactly as parsed; namedTuplecells (which chdb.dbapi now returns as dicts keyed by field name) keep the dict shape with coerced values.2. PK reflection returned
['(user_id)']. ClickHouse 26.5 preserves wrapping parens around a single-column sorting key insystem.tables.sorting_key(ORDER BY (user_id)used to be reported asuser_id).reflection.py::_strip_outer_parensstrips parens that wrap the entire expression before splitting, soget_pk_constraintreturns bare column names on both server generations. (Fixed 34 failing SA-compliance reflection cases.)3. Two upstream bugs we'd locked are now fixed. chdb-core 26.5 fixed
Decimal(P>18)precision loss (chdb#574) andFloatNaN/±Inf folding toNone(chdb#575). The torture-test canaries fired exactly as designed; both are inverted to assert the fixed behavior, as their own failure messages prescribed.The L5 differential reference binary moves from
clickhouse-server:26.3.9.8-ltstoclickhouse-server:26.5.1.882to match the new baseline; the version-skew sanity test guards the pairing.All cursor coercions are no-ops on chdb-core 26.3 native values, so the wrapper works on both binary generations. New torture tests lock the leaf repair for each composite shape that regressed.
Verification (local, chdb 4.1.9 / chdb-core 26.5.0)
clickhouse 26.5.1.882)Bumps version to
0.2.2; CHANGELOG updated.🤖 Generated with Claude Code