docs(readme): drop Nullable(Array/Tuple) example that the compiler rejects#12
Conversation
…jects
ClickHouse does not allow Nullable(Array(...)); the schema compiler
throws UnsupportedException pointing callers at the empty-array
sentinel. Nullable(Tuple(...)) is also rejected because ClickHouse
marks it experimental behind allow_experimental_nullable_tuple_type
and recommends Tuple(Nullable(T1), Nullable(T2), ...) instead. Remove
the incorrect ->array('scores', ...)->nullable() example and its
expected SQL, and rewrite the surrounding prose to document both
constraints accurately.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryThis documentation-only PR corrects a README example that described a
Confidence Score: 5/5Documentation-only change that removes a broken example and replaces incorrect prose with accurate descriptions of both rejection paths, verified against the actual compiler source. No source or test files are touched. Both claims in the new prose — the empty-array workaround for Nullable(Array(...)) and the Tuple(Nullable(T), ...) workaround for Nullable(Tuple(...)) — match the exact error messages thrown at src/Query/Schema/ClickHouse.php:56-58 and :80-82, so the documentation is now correct and consistent with the implementation. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "docs(readme): drop Nullable(Array/Tuple)..." | Re-trigger Greptile |
📊 Coverage
Full per-file breakdown in the job summary. |
Summary
The Array/Tuple ClickHouse schema section in
README.md(currentmain, post-#10) documented a->array('scores', ColumnType::String)->nullable()example expected to compile toNullable(Array(String)). The schema compiler atsrc/Query/Schema/ClickHouse.php:56-58actually throwsUnsupportedException("Nullable(Array(...)) is not supported in ClickHouse. Use an empty array [] to represent a missing value instead.")for this combination. The trailing prose also claimed "Nullable(...)wraps the wholeArray/Tuple" — also wrong for both:Nullable(Tuple(...))is rejected at line 80-82 with a pointer toTuple(Nullable(T1), ...)and the experimentalallow_experimental_nullable_tuple_typesetting.Changes
->array('scores', ...)->nullable()example from the code block.\scores` Nullable(Array(String))` line from the expected-SQL comment.Test plan
src/Query/Schema/ClickHouse.php:56-58and:80-82.testArrayRejectsNullableWrap(added in feat(clickhouse): add UUID, Decimal, Array/Tuple, UInt8/Int8, raw ORDER BY, rawColumn passthrough #10 viaebcdaba) pins the Array rejection behavior.Related
ebcdaba. The README claim slipped through because docs aren't covered by test snapshots.