Repository navigation
Support Nullable(Array) - #115165
Closed
alexey-milovidov wants to merge 111 commits into
Closed
Support Nullable(Array)#115165alexey-milovidov wants to merge 111 commits into
alexey-milovidov wants to merge 111 commits into
Conversation
…red substream names and cache keys. Assign unique structured stream suffixes at every array nesting level, and use the same keys in SubstreamsCache during deserialization to avoid colliding outer and inner null maps.
Handle empty Array(Nothing) element execution in array arithmetic so intDivOrNull does not reach scalar execution with Nothing operands. Keep native Arrow IPC nullable-list inference and explicit non-nullable Array hints aligned with the nullable-array setting and null_as_default behavior. Use the nullable-array-aware wrapper while schema inference recursively reapplies Nullable, and pin the legacy nullable JSON test to the old setting. Add regression coverage for the Array(Nothing) arithmetic case. CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104816&sha=a0eb8fb019a1f3f354c45782deda46d7aac7918b&name_0=PR&name_1=Unit%20tests%20%28asan_ubsan%2C%20function_prop_fuzzer%29 CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104816&sha=a0eb8fb019a1f3f354c45782deda46d7aac7918b&name_0=PR&name_1=Stateless%20tests%20%28amd_tsan%2C%20flaky%20check%29 CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104816&sha=a0eb8fb019a1f3f354c45782deda46d7aac7918b&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20parallel%29 PR: #104816
Respect allow_experimental_nullable_array_type when wrapping array-valued subcolumns extracted through an outer Nullable column. This keeps Nullable(JSON) array paths compatible when random settings disable the experimental Nullable(Array) type. CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104816&sha=7944b5d0e40cace70422529447e1699f14b8167a&name_0=PR&name_1=Stateless+tests+%28arm_binary%2C+parallel%29&name_2=Tests PR: #104816
Allow array element-level tuple arithmetic to run when a nullable scalar denominator has an all-zero replicated null map. This prevents from falling through to the generic element executor and raising . CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104816&sha=0ec4da2f1a92f1ca4fdd4c05effec4f50a04a1ec&name_0=PR&name_1=Unit%20tests%20%28asan_ubsan%2C%20function_prop_fuzzer%29 CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104816&sha=0ec4da2f1a92f1ca4fdd4c05effec4f50a04a1ec&name_0=PR&name_1=Unit%20tests%20%28msan%2C%20function_prop_fuzzer%29 PR: #104816
Old analyzer can keep casts as Const(Nullable(Array(...))). Several nullable-array helper paths only detected ColumnConst through checkAndGetColumnConst<ColumnConst>, so they missed the outer constant wrapper and passed Const(Nullable(Array(...))) into array execution paths that expect ColumnArray. Use checkAndGetColumn<ColumnConst> before inspecting the data column so mapped array functions, arrayFold, arrayReduce, and array arithmetic unwrap const Nullable(Array) arguments consistently. Related: #104816 CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104816&sha=930b8941d0bff0f02fd904a96f6a30bd16120b53&name_0=PR&name_1=Stateless%20tests%20%28amd_llvm_coverage%2C%20old%20analyzer%2C%20s3%20storage%2C%20DBReplicated%2C%20WasmEdge%2C%20parallel%2C%201%2F3%29
Move allow_experimental_nullable_array_type to the 26.8 settings history block so upgrade checks from 26.7 see it. Preserve nullable-array missing/default handling in external format readers and extracted subcolumns. Narrow the upgrade log allow-list for the system.metric_log_0 readonly warning and adjust focused stateless coverage. Related: #104816 CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104816&sha=263d7f95798980e19f9c5ccc5cbe7093c36ae78d&name_0=PR&name_1=Fast%20test%20%28arm_darwin%29 CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104816&sha=263d7f95798980e19f9c5ccc5cbe7093c36ae78d&name_0=PR&name_1=Upgrade%20check%20%28amd_release%29
Keep allow_experimental_nullable_array_type and join_runtime_filter_min_probe_rows in the 26.8 settings history block after merging the current PR head. Related: #104816 CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104816&sha=263d7f95798980e19f9c5ccc5cbe7093c36ae78d&name_0=PR&name_1=Upgrade%20check%20%28amd_release%29
# Conflicts: # src/DataTypes/DataTypeNullable.cpp # src/DataTypes/Serializations/ISerialization.cpp # src/Interpreters/InterpreterCreateQuery.cpp # src/Interpreters/InterpreterCreateQuery.h # src/Processors/Formats/Impl/ORCBlockInputFormat.cpp
# Conflicts: # docs/en/interfaces/specs/NativeFormat.md # docs/en/sql-reference/data-types/array.md # docs/en/sql-reference/data-types/nullable.md # src/Formats/EscapingRuleUtils.cpp # src/Functions/array/arrayFold.cpp # src/Interpreters/InterpreterCreateQuery.cpp # src/Processors/Formats/Impl/ArrowBlockInputFormat.cpp # src/Processors/Formats/Impl/NativeORCBlockInputFormat.cpp # src/Processors/Formats/Impl/ParquetV3BlockInputFormat.cpp # src/Storages/AlterCommands.cpp # src/Storages/MergeTree/MergeTreeReaderCompact.cpp # src/Storages/MergeTree/MutateTask.cpp # tests/queries/0_stateless/03212_max_bytes_to_read_for_schema_inference_in_cache.reference # tests/queries/0_stateless/03526_date_time_input_format_in_schema_inference_cache.reference # tests/queries/0_stateless/03627_input_format_try_infer_variants_in_schema_cache.reference # tests/queries/0_stateless/04262_skip_first_lines_with_names_schema_cache.reference
alexey-milovidov
marked this pull request as draft
August 17, 2026 17:08
Contributor
|
Workflow [PR], commit [838b125] Summary: ❌
|
yakov-olkhovskiy
requested changes
Aug 18, 2026
yakov-olkhovskiy
left a comment
Member
There was a problem hiding this comment.
this issue is more complex than this PR addresses - will work on it myself
Member
Author
|
🕵 Acknowledged. This PR addresses only a partial form of the problem, while the required solution is broader. Closing it so the complete implementation can proceed without retaining this incomplete approach. |
Member
Author
|
🕵 Closed in favor of the complete implementation described by the reviewer. |
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Contributor
|
@alexey-milovidov Thanks for your time, I am busy on find my job for now. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🕵 Supersedes #104816, which cannot be updated because maintainer edits are disabled on its external fork. This carries forward zhanglistar’s implementation, reconciled with current
master, including current Arrow IPC paths and the Native format specification.Related: #104816
Related: #105192
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Add experimental support for
Nullable(Array(...)), enabled withallow_experimental_nullable_array_type.Workflow [PR]
Sync PR [sync-upstream/pr/115165]