Skip to content

Fix exception in DistanceTransposedPartialReadsPass with NULL arguments - #96431

Merged
alexey-milovidov merged 2 commits into
masterfrom
fix-distance-transposed-pass-nullable-nothing
Feb 10, 2026
Merged

alexey-milovidov merged 2 commits into
masterfrom
fix-distance-transposed-pass-nullable-nothing

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Feb 9, 2026 •

Copy link
Copy Markdown
Member

The pass threw a logical error when L2DistanceTransposed or cosineDistanceTransposed had NULL arguments causing the result type to be Nullable(Nothing). After rewriting and re-resolving the function, the result type changed to Float64, triggering the assertion.

Skip the optimization when the result type is onlyNull — there is no benefit to optimizing a function that always returns NULL.

Found by AST fuzzer (amd_ubsan):
https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=6d880459c77dd2082259ce909163c64f8cce6f22&name_0=MasterCI&name_1=AST%20fuzzer%20%28amd_ubsan%29

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Version info

  • Merged into: 26.2.1.509

…ents

The pass threw a logical error when `L2DistanceTransposed` or
`cosineDistanceTransposed` had NULL arguments causing the result type
to be `Nullable(Nothing)`. After rewriting and re-resolving the function,
the result type changed to `Float64`, triggering the assertion.

Skip the optimization when the result type is `onlyNull` — there is no
benefit to optimizing a function that always returns NULL.

Found by AST fuzzer (amd_ubsan):
https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=6d880459c77dd2082259ce909163c64f8cce6f22&name_0=MasterCI&name_1=AST%20fuzzer%20%28amd_ubsan%29

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Feb 9, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [b7e10e1]

Summary: ⏳

job_name test_name status info comment
Integration tests (amd_asan, db disk, old analyzer, 5/6) failure
test_acme_tls/test_multi_node.py::test_coordinated_acme_authorization FAIL cidb
test_acme_tls/test_single_node.py::test_acme_authorization FAIL cidb
Integration tests (amd_binary, 5/5) failure
test_acme_tls/test_single_node.py::test_acme_authorization FAIL cidb
test_acme_tls/test_multi_node.py::test_coordinated_acme_authorization FAIL cidb
Integration tests (arm_binary, distributed plan, 1/4) failure
test_acme_tls/test_multi_node.py::test_coordinated_acme_authorization FAIL cidb
test_acme_tls/test_single_node.py::test_acme_authorization FAIL cidb
Integration tests (amd_tsan, 5/6) failure
test_acme_tls/test_single_node.py::test_acme_authorization FAIL cidb
test_acme_tls/test_multi_node.py::test_coordinated_acme_authorization FAIL cidb

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Feb 9, 2026
@rienath rienath self-assigned this Feb 9, 2026

@rienath rienath 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.

Small change to the test. Otherwise, looks good

@alexey-milovidov
alexey-milovidov merged commit 51f3018 into master Feb 10, 2026
125 of 130 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix-distance-transposed-pass-nullable-nothing branch February 10, 2026 10:11
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci 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.

3 participants