Skip to content

docs(readme): drop Nullable(Array/Tuple) example that the compiler rejects#12

Merged
lohanidamodar merged 1 commit into
mainfrom
fix/readme-nullable-array-tuple
May 20, 2026
Merged

docs(readme): drop Nullable(Array/Tuple) example that the compiler rejects#12
lohanidamodar merged 1 commit into
mainfrom
fix/readme-nullable-array-tuple

Conversation

@lohanidamodar
Copy link
Copy Markdown
Contributor

Summary

The Array/Tuple ClickHouse schema section in README.md (current main, post-#10) documented a ->array('scores', ColumnType::String)->nullable() example expected to compile to Nullable(Array(String)). The schema compiler at src/Query/Schema/ClickHouse.php:56-58 actually throws UnsupportedException("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 whole Array/Tuple" — also wrong for both: Nullable(Tuple(...)) is rejected at line 80-82 with a pointer to Tuple(Nullable(T1), ...) and the experimental allow_experimental_nullable_tuple_type setting.

Changes

  • Remove the ->array('scores', ...)->nullable() example from the code block.
  • Remove the matching \scores` Nullable(Array(String))` line from the expected-SQL comment.
  • Rewrite the trailing prose to accurately document both rejections (Nullable on Array, Nullable on Tuple) and the recommended workarounds.

Test plan

Related

…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-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 20, 2026

Greptile Summary

This documentation-only PR corrects a README example that described a ->array()->nullable() combination which the ClickHouse schema compiler actually rejects with an UnsupportedException. The updated prose now accurately documents both Nullable(Array(...)) and Nullable(Tuple(...)) rejections and their recommended workarounds.

  • Removes the ->array('scores', ColumnType::String)->nullable() builder call and its corresponding scores Nullable(Array(String)) expected-SQL line from the code block.
  • Rewrites the trailing paragraph to state that Nullable(Array(...)) is rejected (use [] as a sentinel) and Nullable(Tuple(...)) is experimental (use Tuple(Nullable(T1), ...) instead), matching the error messages thrown at src/Query/Schema/ClickHouse.php:56-58 and :80-82.

Confidence Score: 5/5

Documentation-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

Filename Overview
README.md Removes the invalid ->array('scores', ...)->nullable() example and rewrites the prose to accurately document both Nullable(Array(...)) and Nullable(Tuple(...)) rejections with their correct workarounds — both verified against src/Query/Schema/ClickHouse.php:56-58 and :80-82.

Reviews (1): Last reviewed commit: "docs(readme): drop Nullable(Array/Tuple)..." | Re-trigger Greptile

@github-actions
Copy link
Copy Markdown

📊 Coverage

Metric PR Baseline Δ
Lines 91.80% (7407/8069) 91.80% +0.00%
Methods 84.42% (1100/1303) 84.42% +0.00%
Classes 65.85% (135/205) 65.85% +0.00%

Full per-file breakdown in the job summary.

@lohanidamodar lohanidamodar merged commit 84d3182 into main May 20, 2026
7 checks passed
@lohanidamodar lohanidamodar deleted the fix/readme-nullable-array-tuple branch May 20, 2026 05:27
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