Skip to content

Support Nullable(Tuple) - #89643

Merged
nihalzp merged 145 commits into
ClickHouse:masterfrom
nihalzp:nullable-tuple
Jan 21, 2026
Merged

nihalzp merged 145 commits into
ClickHouse:masterfrom
nihalzp:nullable-tuple

Conversation

@nihalzp

@nihalzp nihalzp commented Nov 6, 2025 •

Copy link
Copy Markdown
Member
SET allow_experimental_nullable_tuple_type = 1;

CREATE TABLE test (
    id UInt32,
    data Nullable(Tuple(String, Int64))
) ENGINE = Memory;

INSERT INTO test VALUES (1, ('hello', 42)), (2, NULL);

SELECT * FROM test WHERE data IS NULL;
 ┌─id─┬─data─┐
 │  2 │ ᴺᵁᴸᴸ │
 └────┴──────┘

Changelog category (leave one):

  • Backward Incompatible Change

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Add support for Nullable(Tuple). Set allow_experimental_nullable_tuple_type = 1 to enable it.

Backward compatibility change:

JSON, Dynamic, Variant tuple subcolumns now return Nullable(Tuple(...)) instead of Tuple(...). Previously, d.Tuple(T1, T2) returned default values like (default_T1, default_T2) for non-matching rows with type Tuple(T1, T2). Now it returns NULL with type Nullable(Tuple(T1, T2)).

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Continuation of both #53443 and #58238 by @taiyang-li. Contributes to #52562.

Version info

  • Merged into: 26.1.1.737

@clickhouse-gh

clickhouse-gh Bot commented Nov 6, 2025 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [fa98f0c]

Summary: ❌

job_name test_name status info comment
Stateless tests (arm_asan, targeted) error

@clickhouse-gh clickhouse-gh Bot added the pr-experimental Experimental Feature label Nov 6, 2025
@alexey-milovidov

Copy link
Copy Markdown
Member

Thanks! Also, please take a look at #53443 - this could be a continuation.

@nihalzp

nihalzp commented Nov 10, 2025

Copy link
Copy Markdown
Member Author

@alexey-milovidov Thanks! Added it to the PR description.

@nihalzp nihalzp added the do not test disable testing on pull request label Nov 10, 2025
@nihalzp
nihalzp marked this pull request as ready for review January 6, 2026 15:35
@nihalzp
nihalzp requested a review from Avogar January 6, 2026 15:35

@Avogar Avogar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will continue review on Monday

Comment thread src/Analyzer/SetUtils.cpp Resolved
Comment thread src/Analyzer/SetUtils.cpp Resolved

@Avogar Avogar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest looks good to me. Great work!

Comment thread src/Analyzer/SetUtils.cpp Resolved
Comment thread src/Functions/tupleElement.cpp Resolved
@nihalzp
nihalzp requested a review from Avogar January 21, 2026 09:32
Comment thread src/Analyzer/SetUtils.cpp Resolved
@nihalzp
nihalzp added this pull request to the merge queue Jan 21, 2026
Merged via the queue into ClickHouse:master with commit fef217b Jan 21, 2026
250 of 256 checks passed
@nihalzp
nihalzp deleted the nullable-tuple branch January 21, 2026 19:28
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Jan 21, 2026
@nihalzp
nihalzp restored the nullable-tuple branch January 22, 2026 06:25
@nihalzp nihalzp mentioned this pull request Jan 23, 2026
1 task
@alexey-milovidov

Copy link
Copy Markdown
Member

@clickgapai

Copy link
Copy Markdown
Contributor

Hi @nihalzp @Avogar — while reviewing this PR I found the following:

Happy to discuss — close anything that's wrong or already addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-experimental Experimental Feature pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants