Skip to content

fix: chdb-core 26.5.0 compatibility — composite leaf coercion, PK paren strip, inverted upstream-bug locks#12

Merged
ShawnChen-Sirius merged 1 commit into
chdb-io:mainfrom
ShawnChen-Sirius:fix/chdb-core-26.5-compat
Jun 13, 2026
Merged

fix: chdb-core 26.5.0 compatibility — composite leaf coercion, PK paren strip, inverted upstream-bug locks#12
ShawnChen-Sirius merged 1 commit into
chdb-io:mainfrom
ShawnChen-Sirius:fix/chdb-core-26.5-compat

Conversation

@ShawnChen-Sirius

Copy link
Copy Markdown
Collaborator

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']" for Array(Float64) — where 26.3 emitted bare numerics. _cursor.py now walks composite cells recursively, driven by the column's ClickHouse type string, and re-coerces leaves to native float / Decimal / int / date / datetime / time. Container shapes are preserved exactly as parsed; named Tuple cells (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 in system.tables.sorting_key (ORDER BY (user_id) used to be reported as user_id). reflection.py::_strip_outer_parens strips parens that wrap the entire expression before splitting, so get_pk_constraint returns 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) and Float NaN/±Inf folding to None (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-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.

Verification (local, chdb 4.1.9 / chdb-core 26.5.0)

Layer Result
Default (unit + contract + torture) 374 passed, 46 skipped
SA dialect compliance suite 595 passed, 673 skipped
L5 differential (vs real clickhouse 26.5.1.882) 25 passed
L7 fuzz 2 passed
L6 perf smoke 3 passed, 1 skipped
ruff clean
mypy clean

Bumps version to 0.2.2; CHANGELOG updated.

🤖 Generated with Claude Code

…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>
@ShawnChen-Sirius ShawnChen-Sirius merged commit e79267e into chdb-io:main Jun 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant