Skip to content

Fix shared variant decoding for JSON and Dynamic columns#677

Merged
joe-clickhouse merged 4 commits intomainfrom
joe/599-fix-json-shared-data
Mar 10, 2026
Merged

Fix shared variant decoding for JSON and Dynamic columns#677
joe-clickhouse merged 4 commits intomainfrom
joe/599-fix-json-shared-data

Conversation

@joe-clickhouse
Copy link
Copy Markdown
Contributor

@joe-clickhouse joe-clickhouse commented Mar 10, 2026

Summary

  • Fixes incorrect client decoding of ClickHouse JSON and Dynamic values when data is stored in shared overflow structures rather than ordinary typed subcolumns. This affected JSON path overflow cases, Dynamic shared-variant cases, and mixed-type JSON paths across rows.
  • Adds client-side decoding for shared binary values using ClickHouse’s binary type encoding, reuses existing datatype readers through an in-memory ByteSource, and safely falls back to raw bytes for unsupported types.
  • Adds regression coverage for
    • JSON shared-data overflow
    • Dynamic shared-variant overflow
    • Mixed-type JSON paths across rows

Closes #599
Closes #615
Closes #674
Closes #466

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant