Skip to content

Add 1 tests for coverage gaps in PR #115848 - #124521

Merged
alexey-milovidov merged 4 commits into
ClickHouse:masterfrom
clickgapai:qa-bot/coverage-pr115848
Oct 23, 2026
Merged

alexey-milovidov merged 4 commits into
ClickHouse:masterfrom
clickgapai:qa-bot/coverage-pr115848

Conversation

@clickgapai

@clickgapai clickgapai commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Test-only PR. Review: are the gaps real, is the test right.

Adds test coverage for 1 untested code path, found during automated review of PR #115848.
That PR: (1) Adds apply_string_filters_during_scan (off by default, randomized in CI at 50%). extractStringValueFilters turns PREWHERE conjuncts (LIKE, startsWith, endsWith, position, position <op> const, = 'non-empty') into a StringValueFilter. SerializationString (MergeTree) and the …

1. Parquet DELTA_LENGTH_BYTE_ARRAY scan-filter decode path never executed
src/Processors/Formats/Impl/Parquet/Decoding.cpp:885, src/Processors/Formats/Impl/Parquet/Decoding.cpp:902
Risk: The PR changed the entry to if (!filter && !active_value_filter), so the trivial_converter branch is now reached with filter == nullptr. Inside it, filter[...] is guarded by !filter || (Decoding.cpp:902). ClickHouse's writer only emits PLAIN/dictionary pages (Parquet/Write.h:45), …
Unique vs PR tests: The PR's Parquet tests cover the PLAIN (PlainStringDecoder) and dictionary (bit-packed and RLE runs) paths, because ClickHouse cannot write DELTA_LENGTH_BYTE_ARRAY. This test is the only one that sends a PREWHERE string filter, with and without a row mask, through …

cc @alexey-milovidov (author of #115848) — could you take a look, and add the can be tested label if this looks good?

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)

Workflow [PR]
Sync PR [sync-upstream/pr/124521]

Version info

  • Merged into: 26.11.1.638-master (included in 26.11 and later)

@clickgapai

Copy link
Copy Markdown
Contributor Author
Pre-PR validation: 6/6 ✅

a) Deterministic repro? ✅
Test exercises the previously-uncovered branch and passes (correct behaviour).

b) Root cause explained? ✅
src/Processors/Formats/Impl/Parquet/Decoding.cpp:893-928: the trivial_converter branch of DeltaLengthByteArrayDecoder::decode. That covers the value-filter-only case (filter == nullptr), the row mask plus value filter, and updateStats.

c) Fix matches root cause? ✅
N/A for coverage gap — this PR adds a regression test, not a fix. Asserts current correct behaviour at the cited line.

d) Test intent preserved? / New tests added? ✅
New regression test added: 05339_string_filters_parquet_delta_length_byte_array.sh.

e) Both directions demonstrated? ✅
Test passes (MATCH) on master proving current correctness; would fail if the cited branch regressed. Single-direction is the correct shape for a coverage gap test.

f) Fix is general, not a narrow patch? ✅
Test asserts the invariant at the cited line — covers the branch, not a specific input shape.

@clickhouse-gh clickhouse-gh Bot added the comp-testing Test content only (no production code). label Oct 8, 2026
@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Oct 18, 2026
@clickhouse-gh

clickhouse-gh Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [b837745]

Summary: ✅


AI Review

Summary

Adds regression coverage for position comparisons and scan-time string filtering of Parquet DELTA_LENGTH_BYTE_ARRAY pages, including row masks, partial reads, and nullable values. All three prior findings are addressed in the current code. No new actionable findings.

Missing context / blind spots
  • ⚠️ Full stateless CI for b83774520951e2334462416f0ccddfbde25f2e09 is pending. 05338_string_filters_position_comparisons passes Fast test; the Parquet test is intentionally skipped there. Parquet execution evidence comes from the author's reported successful runs and debugger trace, consistent with the current reader and decoder code. No local rerun was performed because this checkout has neither a ClickHouse binary nor pyarrow; completed stateless CI would provide independent runtime confirmation. CI report.
Final Verdict

Status: ✅ Approve. No outstanding review changes required.

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Oct 18, 2026
Result equivalence stays green if `position(...) <op> const` stops being
extracted. Check `StringValueFilterValuesChecked > 0` in `query_log` for a
`position(s, 'needle') != 0` read pinned to `enable_parallel_replicas = 0`.

Requested by @clickhouse-gh[bot] in ClickHouse#124521 (comment)
On master, StringValueFilter disables itself after 8192 checks when it skips
fewer than 16 bytes per checked value; the fixture skipped 14.3-15.4.

Requested by @clickhouse-gh[bot] in ClickHouse#124521 (comment)
…row mask

With the default block size every 10000-row group is one block, the page is
not initialized yet, and `decodePrimitiveColumn` reads each passing row range
without a mask. With `input_format_parquet_max_block_size = 1000`, the later
blocks of a row group pass the `id % 3 = 0` mask into
`DeltaLengthByteArrayDecoder::decode` together with the value filter.

Requested by @clickhouse-gh[bot] in ClickHouse#124521 (comment)
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Oct 23, 2026
@alexey-milovidov alexey-milovidov self-assigned this Oct 23, 2026
Merged via the queue into ClickHouse:master with commit 16243e5 Oct 23, 2026
178 checks passed
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 23, 2026
@clickhouse-gh clickhouse-gh Bot added comp-parquet-reader-v3 Issues related to the native Parquet reader. and removed comp-testing Test content only (no production code). labels Nov 22, 2026
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 comp-parquet-reader-v3 Issues related to the native Parquet reader. 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.

3 participants