Skip to content

Fix logical error caused by Nothing type in caseWithExpression function #92351

Merged
alexey-milovidov merged 3 commits intoClickHouse:masterfrom
nihalzp:fix-case-with-expression
Dec 17, 2025
Merged

Fix logical error caused by Nothing type in caseWithExpression function #92351
alexey-milovidov merged 3 commits intoClickHouse:masterfrom
nihalzp:fix-case-with-expression

Conversation

@nihalzp
Copy link
Copy Markdown
Member

@nihalzp nihalzp commented Dec 17, 2025

The following query has logical error:

SELECT caseWithExpression(1, assumeNotNull(materialize(NULL)), 1, 1);

Changelog category (leave one):

  • Critical Bug Fix (crash, data loss, RBAC) or LOGICAL_ERROR

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

Fix logical error caused by using Nothing type in caseWithExpression function arguments . Closes #85354.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Dec 17, 2025

Workflow [PR], commit [f3a8767]

Summary:

@clickhouse-gh clickhouse-gh bot added pr-critical-bugfix pr-must-backport Pull request should be backported intentionally. Use this label with great care! labels Dec 17, 2025
); -- { serverError ILLEGAL_COLUMN }
); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT }

SELECT caseWithExpression('C', 'A', true, 'B', false); -- { serverError BAD_ARGUMENTS }
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.

Usually, we prefer adding new tests rather than modifying existing tests.

@alexey-milovidov alexey-milovidov self-assigned this Dec 17, 2025
@alexey-milovidov alexey-milovidov added this pull request to the merge queue Dec 17, 2025
Merged via the queue into ClickHouse:master with commit 1c42187 Dec 17, 2025
250 of 256 checks passed
@robot-ch-test-poll1 robot-ch-test-poll1 added pr-synced-to-cloud The PR is synced to the cloud repo pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR labels Dec 17, 2025
robot-ch-test-poll3 added a commit that referenced this pull request Dec 17, 2025
Cherry pick #92351 to 25.8: Fix logical error caused by `Nothing` type in `caseWithExpression` function
robot-clickhouse added a commit that referenced this pull request Dec 17, 2025
robot-ch-test-poll3 added a commit that referenced this pull request Dec 17, 2025
Cherry pick #92351 to 25.9: Fix logical error caused by `Nothing` type in `caseWithExpression` function
robot-clickhouse added a commit that referenced this pull request Dec 17, 2025
robot-ch-test-poll3 added a commit that referenced this pull request Dec 17, 2025
Cherry pick #92351 to 25.10: Fix logical error caused by `Nothing` type in `caseWithExpression` function
robot-clickhouse added a commit that referenced this pull request Dec 17, 2025
robot-ch-test-poll3 added a commit that referenced this pull request Dec 17, 2025
Cherry pick #92351 to 25.11: Fix logical error caused by `Nothing` type in `caseWithExpression` function
robot-clickhouse added a commit that referenced this pull request Dec 17, 2025
clickhouse-gh bot added a commit that referenced this pull request Dec 17, 2025
Backport #92351 to 25.11: Fix logical error caused by `Nothing` type in `caseWithExpression` function
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Dec 18, 2025
clickhouse-gh bot added a commit that referenced this pull request Dec 18, 2025
Backport #92351 to 25.10: Fix logical error caused by `Nothing` type in `caseWithExpression` function
clickhouse-gh bot added a commit that referenced this pull request Dec 18, 2025
Backport #92351 to 25.9: Fix logical error caused by `Nothing` type in `caseWithExpression` function
clickhouse-gh bot added a commit that referenced this pull request Dec 18, 2025
Backport #92351 to 25.8: Fix logical error caused by `Nothing` type in `caseWithExpression` function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-critical-bugfix pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

3 participants