Skip to content

Add a test for #70015#96009

Merged
alexey-milovidov merged 2 commits intomasterfrom
fix-issue-70015-test
Feb 5, 2026
Merged

Add a test for #70015#96009
alexey-milovidov merged 2 commits intomasterfrom
fix-issue-70015-test

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

The issue was a logical error in FunctionBinaryArithmetic where minus operation threw "Arguments of 'minus' have incorrect data types" when operating on Int64 and Int32 types during header computation.

The bug was fixed by commit 3c264f8 which corrected recursive calls to getReturnTypeImplStatic for special type cases.

This test verifies the fix by testing the exact query pattern from the issue: if(CAST(equals(), 'Nullable(Bool)'), sign(Int64), Int64) - Int32

Closes #70015

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

The issue was a logical error in `FunctionBinaryArithmetic` where
`minus` operation threw "Arguments of 'minus' have incorrect data types"
when operating on `Int64` and `Int32` types during header computation.

The bug was fixed by commit 3c264f8 which corrected recursive calls
to `getReturnTypeImplStatic` for special type cases.

This test verifies the fix by testing the exact query pattern from the
issue: `if(CAST(equals(), 'Nullable(Bool)'), sign(Int64), Int64) - Int32`

Closes #70015

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Feb 5, 2026

Workflow [PR], commit [c85e0c9]

Summary:

job_name test_name status info comment
Stress test (arm_asan, s3) failure
Logical error: Block structure mismatch in A stream: different number of columns: (STID: 0993-38e6) FAIL cidb

@clickhouse-gh clickhouse-gh bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Feb 5, 2026
@Algunenano Algunenano self-assigned this Feb 5, 2026
Copy link
Copy Markdown
Member

@Algunenano Algunenano left a comment

Choose a reason for hiding this comment

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

I can't reproduce the original issue with this reproducer:

$ for dir in *24\.*; do echo $dir; ./$dir/usr/bin/clickhouse local --queries-file /tmp/repro.sql; done
clickhouse-common-static-24.10.1.2812
-2
-1
5
5
5
5
clickhouse-common-static-24.11.1.2557
-2
-1
5
5
5
5
clickhouse-common-static-24.12.2.29
-2
-1
5
5
5
5
clickhouse-common-static-24.1.3.31
-2
-1
5
5
5
5
clickhouse-common-static-24.2.1.2248
-2
-1
5
5
5
5
clickhouse-common-static-24.3.2.23
-2
-1
5
5
5
5
clickhouse-common-static-24.4.1.2088
-2
-1
5
5
5
5
clickhouse-common-static-24.5.4.49
-2
-1
5
5
5
5
clickhouse-common-static-24.6.2.17
-2
-1
5
5
5
5
clickhouse-common-static-24.7.1.2915
-2
-1
5
5
5
5
clickhouse-common-static-24.8.2.3
-2
-1
5
5
5
5
clickhouse-common-static-24.9.1.3278
-2
-1
5
5
5
5

Are you sure it's not too simplified?

@alexey-milovidov
Copy link
Copy Markdown
Member Author

That's interesting. I've found another problem with JIT while doing this PR (see the sibling PR). But after factoring it away, it looks like the test serves only as a proof of an attempt to reproduce the old issue.

@alexey-milovidov
Copy link
Copy Markdown
Member Author

I'll remove the misleading comment from the test, and then I think we can have it - it will give some marginal advantage to AST Fuzzer and, potentially, the test still has some unique code paths.

(It will be nice when @alexbakharew finish the differential coverage)

@alexey-milovidov alexey-milovidov merged commit 818c5fe into master Feb 5, 2026
130 of 133 checks passed
@alexey-milovidov alexey-milovidov deleted the fix-issue-70015-test branch February 5, 2026 22:01
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog 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.

Server throws exception: Logical error: 'Arguments of 'minus' have incorrect data types

3 participants