Skip to content

Fix logical error with empty tuple inside IN function#89850

Merged
nihalzp merged 8 commits intoClickHouse:masterfrom
nihalzp:fix-empty-tuple-crash-in-function
Nov 12, 2025
Merged

Fix logical error with empty tuple inside IN function#89850
nihalzp merged 8 commits intoClickHouse:masterfrom
nihalzp:fix-empty-tuple-crash-in-function

Conversation

@nihalzp
Copy link
Copy Markdown
Member

@nihalzp nihalzp commented Nov 11, 2025

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 with empty tuple inside IN function. Closes #88343.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Details

Fix SELECT tuple() IN tuple(); logical error, STD_EXCEPTION.

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Nov 11, 2025

Workflow [PR], commit [d397766]

Summary:

job_name test_name status info comment
Bugfix validation (functional tests) error
Integration tests (amd_tsan, 1/6) failure
test_storage_s3_queue/test_parallel_inserts.py::test_parallel_inserts_with_failures[1] FAIL cidb, flaky
AST fuzzer (arm_asan) failure
Logical error: 'RangeReader read 3 rows, but 32 expected.'. FAIL cidb

@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 Nov 11, 2025
@Avogar Avogar self-assigned this Nov 11, 2025
@nihalzp
Copy link
Copy Markdown
Member Author

nihalzp commented Nov 11, 2025

@Avogar The AST fuzzer (arm_asan) error is unrelated. It can be reproduced on master. #89691

SET allow_experimental_full_text_index=1, receive_timeout = 10., receive_data_timeout_ms = 10000, allow_suspicious_low_cardinality_types = true, optimize_skip_unused_shards = true, force_optimize_skip_unused_shards = 2, use_skip_indexes_on_data_read = true, log_queries = true, table_function_remote_max_addresses = 200, max_execution_time = 10., max_memory_usage = 10000000000, send_logs_level = 'fatal', allow_introspection_functions = true, allow_experimental_nlp_functions = true, allow_experimental_full_text_index = true;

CREATE TABLE tab (`id` UInt64, `text` String, INDEX inv_idx text TYPE text(tokenizer = 'splitByNonAlpha') GRANULARITY 4) ENGINE = MergeTree ORDER BY id SETTINGS index_granularity = 32, index_granularity_bytes = 0, min_bytes_for_wide_part = 0;

INSERT INTO tab FORMAT Values (0,'a'),(1,'b'),(2,'c');

SELECT id FROM tab PREWHERE hasToken(text, 'b');

@nihalzp
Copy link
Copy Markdown
Member Author

nihalzp commented Nov 12, 2025

@nihalzp nihalzp added this pull request to the merge queue Nov 12, 2025
Merged via the queue into ClickHouse:master with commit 5c7b1ad Nov 12, 2025
126 of 130 checks passed
@nihalzp nihalzp deleted the fix-empty-tuple-crash-in-function branch November 12, 2025 01:54
@nihalzp nihalzp restored the fix-empty-tuple-crash-in-function branch November 12, 2025 02:02
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 12, 2025
@robot-ch-test-poll robot-ch-test-poll added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Nov 12, 2025
robot-clickhouse added a commit that referenced this pull request Nov 12, 2025
Cherry pick #89850 to 25.3: Fix logical error with empty tuple inside IN function
robot-clickhouse added a commit that referenced this pull request Nov 12, 2025
Cherry pick #89850 to 25.8: Fix logical error with empty tuple inside IN function
robot-clickhouse added a commit that referenced this pull request Nov 12, 2025
Cherry pick #89850 to 25.9: Fix logical error with empty tuple inside IN function
robot-clickhouse added a commit that referenced this pull request Nov 12, 2025
Cherry pick #89850 to 25.10: Fix logical error with empty tuple inside IN function
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Nov 12, 2025
clickhouse-gh bot added a commit that referenced this pull request Nov 12, 2025
Backport #89850 to 25.10: Fix logical error with empty tuple inside IN function
clickhouse-gh bot added a commit that referenced this pull request Nov 20, 2025
Backport #89850 to 25.9: Fix logical error with empty tuple inside IN function
clickhouse-gh bot added a commit that referenced this pull request Nov 20, 2025
Backport #89850 to 25.8: Fix logical error with empty tuple inside IN function
nihalzp added a commit that referenced this pull request Nov 20, 2025
Backport #89850 to 25.3: Fix logical error with empty tuple inside IN 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

Development

Successfully merging this pull request may close these issues.

std::out_of_range with IN empty tuple

5 participants