Skip to content

fix(clickhouse): preserve nulls in query results - #657

Merged
zzylol merged 3 commits into
mainfrom
fix/clickhouse-null-results
Sep 11, 2026
Merged

zzylol merged 3 commits into
mainfrom
fix/clickhouse-null-results

Conversation

@zzylol

@zzylol zzylol commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

A real ClickHouse differential replay exposed that the backend omitted nullable JSON fields and encoded TSV NULL as an empty string. Native ClickHouse returns explicit JSON nulls and the default \N TSV marker, so successful DAG execution could still return a different result document.

Enable explicit nulls in both Arrow JSON writers and emit the default TSV null marker before string escaping. A client override of format_tsv_null_representation takes the existing exact fallback path. Empty strings and literal \N strings remain distinct from SQL NULL.

Validation: the regression covers JSON, JSONEachRow and TSV; the real Planner → installed DAG → backend HTTP differential replay that exposed the issue now passes against ClickHouse. Native TSV output was also checked directly. This fixes result encoding and makes no performance claim.

@zzylol
zzylol merged commit aa0b020 into main Sep 11, 2026
1 check 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