Skip to content

Add test: ColumnIPv6 per-row indexing in FunctionStringHashFixedString only tested with identical values across rows - #103885

Closed
clickgapai wants to merge 2 commits into
ClickHouse:masterfrom
clickgapai:qa-bot/coverage-pr60359
Closed

clickgapai wants to merge 2 commits into
ClickHouse:masterfrom
clickgapai:qa-bot/coverage-pr60359

Conversation

@clickgapai

Copy link
Copy Markdown
Contributor

Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.

Retrospective finding from a historical scan of PR #60359 (merged 2024-02-28). Confirmed on current codebase — close with a note if already fixed.

This is a test-only PR — no source code changes. Please review: test quality, whether the claimed coverage gaps are real, and whether test output makes sense.

Adds test coverage for 1 untested code path(s), found during automated review of PR #60359.
That PR PR fixes per-row indexing bug in FunctionStringHashFixedString::executeImpl ColumnIPv6 branch at src/Functions/FunctionsStringHashFixedString.cpp:316 (post-fix line 334). For ColumnIPv6, the underlying container is PaddedPODArray<IPv6> where each element is already 16 bytes, so `&data[i *

1. ColumnIPv6 per-row indexing in FunctionStringHashFixedString only tested with identical values across rows
src/Functions/FunctionsStringHashFixedString.cpp:334
Risk: The PR fixed &data[i * length] -> &data[i] at line 334 (was 282 in the diff). PR's own 02998_ipv6_hashing.sql uses materialize('fe80::62:5aff:fed1:daf0') so all 10 rows hash to the same value
What's unique vs PR tests: PR's 02998_ipv6_hashing.sql materializes a SINGLE IPv6 value across 10 rows — all hashes are identical, so a regression that always reads row 0 (or any other fixed row) would still produce identical
Tags: -- Tags: no-fasttest — no-fasttest: Hash functions like SHA256 require OpenSSL via USE_SSL build flag, which is disabled in the fast-test build. Same tag is used by the PR's own 02998_ipv6_hashing.sql and by 02184_hash_functions_and_ip_types.sql.
Try it on ClickHouse Fiddle

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

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

Not applicable — test-only change.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label May 1, 2026
@clickhouse-gh

clickhouse-gh Bot commented May 1, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [413d840]

Summary: ❌

job_name test_name status info comment
Config Workflow ERROR
Dockers Build (amd) DROPPED
Dockers Build (arm) DROPPED
Dockers Build (multiplatform manifest) DROPPED
Style check DROPPED
Code Review DROPPED
Docs check DROPPED
Docs check (Mintlify) DROPPED
Fast test DROPPED
CI Tests DROPPED

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label May 1, 2026
@clickgapai

Copy link
Copy Markdown
Contributor Author

CI check Stress test (arm_release) failed, but the failure does not reference this PR's test (04146_ipv6_hashing_distinct_values).

This PR is test-only; the bot will not retrigger CI or modify the test to chase a failure that appears unrelated. If you believe the failure is related to this test, please comment with details and the bot will re-evaluate.

@clickgapai

Copy link
Copy Markdown
Contributor Author

This PR has accumulated 5 CI failures that don't reference its test, so the bot has not attempted any fix. Closing — please re-run CI or comment if you'd like the bot to look again.

@clickgapai

Copy link
Copy Markdown
Contributor Author

The bot has tried to address CI failures on this PR 5 times without a successful push (logs unavailable / context insufficient / plan rejected). Stopping further auto-fix attempts on Stress test (arm_release) — needs human review.

@clickgapai

Copy link
Copy Markdown
Contributor Author

CI failure in Stress test (arm_release), Stateless tests (amd_debug, distributed plan, s3 storage, parallel) appears to be unrelated breakage and is not related to this change. Let me know if you'd like me to merge master and retrigger CI.

@clickgapai

Copy link
Copy Markdown
Contributor Author

CI failure in Stress test (arm_release) appears to be infrastructure and is not related to this change. Let me know if you'd like me to merge master and retrigger CI.

@clickgapai

Copy link
Copy Markdown
Contributor Author

CI failure in Stateless tests (amd_debug, distributed plan, s3 storage, parallel) appears to be unrelated breakage and is not related to this change. Let me know if you'd like me to merge master and retrigger CI.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ alexey-milovidov
❌ ClickGap AI Bot


ClickGap AI Bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@clickgapai

Copy link
Copy Markdown
Contributor Author

CI failure in Config Workflow appears to be unrelated breakage and is not related to this change. Let me know if you'd like me to merge master and retrigger CI.

@zlareb1

zlareb1 commented Aug 10, 2026

Copy link
Copy Markdown
Member

@groeneai can you take this up and open a new PR?

@zlareb1 zlareb1 closed this Aug 10, 2026
@groeneai

Copy link
Copy Markdown
Collaborator

Taking this up. Triaged against master 2850e469dcac84b before answering.

Verified: src/Functions/FunctionsStringHashFixedString.cpp:334 still present; test passes with distinct per-row IPv6 values and output matches the reference.

It will be re-filed as part of an area-grouped PR rather than its own PR, to keep reviewer load down (26 in this batch plus 18 from the earlier one today). Full triage and the grouping plan: #101781 (comment)

@groeneai

Copy link
Copy Markdown
Collaborator

Re-filed as #114260, grouped with the other five functions/types tests from this batch rather than as its own PR, to keep reviewer load down.

Adopted with a stronger oracle. count(DISTINCT SHA256(addr)) measures cardinality, not the per-row binding the test is about: a read that permutes rows still yields four distinct digests. It now pins the ordered (addr, hex(SHA256(addr))) mapping, and a permuting-read mutation reddens it while the original assertion stays green on the same binary.

huldarchen pushed a commit to huldarchen/ClickHouse that referenced this pull request Aug 24, 2026
Re-files six test-only coverage PRs that were closed without merging, at the
request of their author. Each test was verified to be non-vacuous by mutating
the exact line it claims to cover and requiring the test to fail; the arms and
their controls are listed below.

- 04201_dot_product_const_nonconst_size_mismatch: the size check in
  arrayDotProduct's one-constant-argument path. The existing 02708_dotProduct
  covers only equal sizes there, and the two-non-constant path throws from a
  different site with a different message.
- 04201_array_index_of_count_equal_nullable_value: the null_map row skip shared
  by has/indexOf/countEqual. Only has() reached it before. Trimmed to
  Nullable(UInt64): with Nullable(String) the nested default never equals an
  array element, so that variant cannot detect the regression.
- 04201_json_extract_keys_and_values_low_cardinality_input: LowCardinality
  stripping for the two functions that force their return type. Only
  JSONExtract exercised it with a non-constant LowCardinality column.
- 04329_like_fixedstring_constant_match_everything: the matches-everything
  shortcut for a FixedString haystack. Existing FixedString LIKE tests all use
  substantive patterns. Keeps one row per template instantiation
  (LIKE / NOT LIKE / ILIKE / match).
- 04146_ipv6_hashing_distinct_values: per-row indexing when hashing an IPv6
  column. 02998_ipv6_hashing repeats a single value, so it cannot detect a
  regression that always reads row 0.
- 04201_windowID_hop_time_overflow: the hop-window overflow guard, which is
  duplicated in the windowID and hop code paths. Neither copy was tested;
  mutating one reddens only its own row, so both are now pinned. Every
  argument carries an explicit timezone because an unqualified DateTime
  literal is read in the session timezone, which CI randomizes across the
  overflow boundary.

Related: ClickHouse#103918
Related: ClickHouse#103922
Related: ClickHouse#103940
Related: ClickHouse#107447
Related: ClickHouse#103885
Related: ClickHouse#103931
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants