Skip to content

fix(clickhouse): refuse values with no SQL literal instead of writing String(value) - #36

Merged
Makisuo merged 2 commits into
mainfrom
fix/untyped-literal-refuses-non-scalars
Oct 21, 2026
Merged

Makisuo merged 2 commits into
mainfrom
fix/untyped-literal-refuses-non-scalars

docs(expressions): name the refused values and both undefined error c…

32d91da
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Oct 21, 2026 in 12s

Confidence 10/10 · No issues found

🟢 Confidence 10/10 · safe to merge
Only docs changed since the last review; the refusal path is pinned by seven typed tests and the one open wording defect remains.
1 note · tests covered · risk medium

The toFragment fallback now fails compilation with InvalidLiteral instead of writing String(value) as SQL, and the guide documents the refused values. The new behavior is tested and safe; only the error wording in describeUntyped remains wrong.

Still open from earlier reviews

  • 🔵 Note · F1 · describeUntyped says "a object" instead of "an object" · src/ch/expr.ts:325
What was checked
  • null and bigint are handled before the failure at src/ch/expr.ts:310-311, so the pinned scalar test still holds
  • describeUntyped is exact for arrays, functions and symbols; only plain objects read wrong (src/ch/expr.ts:326)
  • Docs paragraph now names both undefined codes, matching refusedNull versus the fallback

32d91da · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.