Skip to content

Rework approach to cudf-streaming bloom filter sizing - #23067

Merged
rapids-bot[bot] merged 6 commits into
NVIDIA:release/26.08from
wence-:wence/fix/bloom-filter-size
Jul 23, 2026
Merged

Rework approach to cudf-streaming bloom filter sizing#23067
rapids-bot[bot] merged 6 commits into
NVIDIA:release/26.08from
wence-:wence/fix/bloom-filter-size

Conversation

@wence-

@wence- wence- commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Description

Rather than asking for a fitting number of blocks for an size, just require
the user to provide the size of the filter directly. Since it must be a
multiple of the storage type, also offer an aligned_size utility that takes
an input and makes that happen.

Additionally, share the new cuco parametric filter policy across cudf and
cudf-streaming.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@wence-
wence- requested review from a team as code owners July 1, 2026 16:48
@wence-
wence- requested a review from nirandaperera July 1, 2026 16:48
@github-actions github-actions Bot added libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API. CMake CMake build issue cudf-polars Issues specific to cudf-polars labels Jul 1, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Jul 1, 2026
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Migrates bloom filter sizing from block counts to aligned byte sizes across C++ and Python APIs. Adds a shared Arrow-compatible policy alias, updates device allocation and merge paths, adjusts benchmarks and integrations, and adds C++ and Python validation tests.

Changes

Bloom filter byte-size API migration

Layer / File(s) Summary
C++ filter_size API contracts
cpp/libcudf_streaming/include/cudf_streaming/...
Constructors and factories now accept aligned byte sizes, expose aligned_size, and remove fitting_num_blocks.
Shared Arrow bloom filter policy
cpp/include/cudf/reduction/bloom_filter.cuh, cpp/src/io/parquet/..., cpp/tests/io/...
Adds the shared cudf::arrow_filter_policy alias and uses it in Parquet reader and test code.
Byte-sized device filter implementation
cpp/libcudf_streaming/src/...
Validates sizes, derives block counts internally, allocates storage, and propagates filter_size through build, merge, and apply.
C++ integrations and validation
cpp/libcudf_streaming/benchmarks/..., cpp/libcudf_streaming/tests/...
Updates NDSH benchmark sizing and adds tests for alignment, policy limits, block indexing, and device storage.
Python bindings and usage
python/cudf_streaming/cudf_streaming/bloom_filter.*, python/.../join.py, python/.../test_bloom_filter.py
Updates Python interfaces and callers to pass byte sizes directly and tests aligned-size validation.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • rapidsai/cudf#23293: Modifies related streaming bloom filter internals in overlapping construction and build/merge/apply paths.
  • rapidsai/cudf#23395: Changes overlapping device_bloom_filter constructor, view, and storage signatures.
  • rapidsai/cudf#23398: Modifies the same streaming bloom filter APIs and construction paths.

Suggested reviewers: lamarrr, nirandaperera, shrshi, vyasr, bdice

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.90% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: switching cudf-streaming bloom filter sizing to a new approach.
Description check ✅ Passed The description directly matches the changeset, covering direct filter sizing, aligned_size, and the shared filter policy.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
cpp/libcudf_streaming/tests/streaming/test_bloom_filter.cu (1)

38-56: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Missing zero-size edge case for device_bloom_filter::storage.

The doc contract requires filter_size to be a "positive multiple of the filter block size," but this test only exercises the unaligned (65) case, not zero. The sibling bloom_filter test (test_bloom_filter_config.cpp) explicitly covers filter_size == 0; add the same coverage here for device_bloom_filter::storage.

As per path instructions, cpp/**/*test*.{cu,cpp} guideline: "Test functions must cover edge cases: empty input, null values, sliced columns, boundary sizes, multi-block sizes."

✅ Suggested addition
   EXPECT_THROW(cudf_streaming::detail::device_bloom_filter::storage(
                  unaligned_size, stream, cudf::get_current_device_resource_ref()),
                std::logic_error);
+
+  EXPECT_THROW(cudf_streaming::detail::device_bloom_filter::storage(
+                 std::size_t{0}, stream, cudf::get_current_device_resource_ref()),
+               std::logic_error);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cpp/libcudf_streaming/tests/streaming/test_bloom_filter.cu` around lines 38 -
56, The DeviceBloomFilterTest::RequiresAlignedStorageSize coverage is missing
the zero-size edge case for
cudf_streaming::detail::device_bloom_filter::storage. Add a check that passing
filter_size == 0 to device_bloom_filter::storage with the current stream and
resource reference throws std::logic_error, matching the contract and the
sibling bloom_filter tests. Keep the existing unaligned and aligned assertions,
and locate the change in DeviceBloomFilterTest and device_bloom_filter::storage
usage.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@cpp/libcudf_streaming/tests/streaming/test_bloom_filter.cu`:
- Around line 38-56: The DeviceBloomFilterTest::RequiresAlignedStorageSize
coverage is missing the zero-size edge case for
cudf_streaming::detail::device_bloom_filter::storage. Add a check that passing
filter_size == 0 to device_bloom_filter::storage with the current stream and
resource reference throws std::logic_error, matching the contract and the
sibling bloom_filter tests. Keep the existing unaligned and aligned assertions,
and locate the change in DeviceBloomFilterTest and device_bloom_filter::storage
usage.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4a5be620-43d2-42b8-8af4-8b37024da25d

📥 Commits

Reviewing files that changed from the base of the PR and between a5dccda and d23c38a.

📒 Files selected for processing (16)
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q03.cpp
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q04.cpp
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q21.cpp
  • cpp/libcudf_streaming/include/cudf_streaming/bloom_filter.hpp
  • cpp/libcudf_streaming/include/cudf_streaming/detail/device_bloom_filter.hpp
  • cpp/libcudf_streaming/include/cudf_streaming/detail/large_arrow_filter_policy.cuh
  • cpp/libcudf_streaming/src/bloom_filter.cpp
  • cpp/libcudf_streaming/src/detail/device_bloom_filter.cu
  • cpp/libcudf_streaming/tests/CMakeLists.txt
  • cpp/libcudf_streaming/tests/streaming/test_bloom_filter.cu
  • cpp/libcudf_streaming/tests/streaming/test_bloom_filter_config.cpp
  • python/cudf_polars/cudf_polars/streaming/actor_graph/join.py
  • python/cudf_streaming/cudf_streaming/bloom_filter.pxd
  • python/cudf_streaming/cudf_streaming/bloom_filter.pyi
  • python/cudf_streaming/cudf_streaming/bloom_filter.pyx
  • python/cudf_streaming/cudf_streaming/tests/test_bloom_filter.py

@mhaseeb123
mhaseeb123 self-requested a review July 1, 2026 19:12
Comment thread cpp/libcudf_streaming/include/cudf_streaming/detail/large_arrow_filter_policy.cuh Outdated
@wence-
wence- force-pushed the wence/fix/bloom-filter-size branch from d23c38a to ab98fee Compare July 2, 2026 08:36
@wence- wence- added the DO NOT MERGE Hold off on merging; see PR for details label Jul 2, 2026
@wence-

wence- commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Should wait for #23049 and use the new parametric policy that PR introduces

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
cpp/libcudf_streaming/tests/streaming/test_bloom_filter_config.cpp (1)

14-37: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Anonymous namespace wraps TEST macros.

As per coding guidelines, "Test code must be in the global namespace, not in custom namespaces". The namespace { ... } block here wraps both TEST cases; consider moving them to the global namespace for consistency with this rule.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cpp/libcudf_streaming/tests/streaming/test_bloom_filter_config.cpp` around
lines 14 - 37, The BloomFilterTest cases are currently defined inside an
anonymous namespace, but TEST macros must live in the global namespace. Remove
the surrounding anonymous namespace in test_bloom_filter_config.cpp so
AlignsStorageSize and RequiresAlignedStorageSize are declared at global scope,
keeping the existing cudf_streaming::bloom_filter references unchanged.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@cpp/libcudf_streaming/tests/streaming/test_bloom_filter_config.cpp`:
- Around line 14-37: The BloomFilterTest cases are currently defined inside an
anonymous namespace, but TEST macros must live in the global namespace. Remove
the surrounding anonymous namespace in test_bloom_filter_config.cpp so
AlignsStorageSize and RequiresAlignedStorageSize are declared at global scope,
keeping the existing cudf_streaming::bloom_filter references unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: df97bac8-1d0a-4448-bbf9-ad0d2f12a4aa

📥 Commits

Reviewing files that changed from the base of the PR and between d23c38a and ab98fee.

📒 Files selected for processing (12)
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q03.cpp
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q04.cpp
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q21.cpp
  • cpp/libcudf_streaming/include/cudf_streaming/bloom_filter.hpp
  • cpp/libcudf_streaming/include/cudf_streaming/detail/device_bloom_filter.hpp
  • cpp/libcudf_streaming/include/cudf_streaming/detail/large_arrow_filter_policy.cuh
  • cpp/libcudf_streaming/src/bloom_filter.cpp
  • cpp/libcudf_streaming/src/detail/device_bloom_filter.cu
  • cpp/libcudf_streaming/tests/CMakeLists.txt
  • cpp/libcudf_streaming/tests/streaming/test_bloom_filter.cu
  • cpp/libcudf_streaming/tests/streaming/test_bloom_filter_config.cpp
  • python/cudf_polars/cudf_polars/streaming/actor_graph/join.py
🚧 Files skipped from review as they are similar to previous changes (11)
  • cpp/libcudf_streaming/include/cudf_streaming/detail/large_arrow_filter_policy.cuh
  • python/cudf_polars/cudf_polars/streaming/actor_graph/join.py
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q03.cpp
  • cpp/libcudf_streaming/tests/CMakeLists.txt
  • cpp/libcudf_streaming/tests/streaming/test_bloom_filter.cu
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q21.cpp
  • cpp/libcudf_streaming/src/bloom_filter.cpp
  • cpp/libcudf_streaming/include/cudf_streaming/bloom_filter.hpp
  • cpp/libcudf_streaming/include/cudf_streaming/detail/device_bloom_filter.hpp
  • cpp/libcudf_streaming/src/detail/device_bloom_filter.cu
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q04.cpp

@wence-
wence- force-pushed the wence/fix/bloom-filter-size branch from ab98fee to 51d84d7 Compare July 10, 2026 17:04
@wence-
wence- requested a review from a team as a code owner July 10, 2026 17:04
@wence-
wence- requested review from lamarrr and shrshi July 10, 2026 17:04

@TomAugspurger TomAugspurger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Python changes look good, but one question about a rapidsmpf import.

from libc.stdint cimport uint64_t
from libcpp.memory cimport shared_ptr, unique_ptr

from rapidsmpf._detail.exception_handling cimport ex_handler

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we avoid the ._detail API import from rapidsmpf here, perhaps by making it public in rapidsmpf (and updating the usage here in another PR)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I will do this separately.

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

LGTM. Some of this logic could eventually be moved into cuco, but I don't think it's worth blocking this PR.

*
* Maximum valid filter size in bytes.
*/
[[nodiscard]] static std::size_t max_size() noexcept;

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.

@sleeepyjack I think this is the kind of utility, along with the corresponding validation checks, that we should expose in cuco rather than expecting users to implement themselves. Similar to how we provide utilities/constructors for configuring HLL from different perspectives, such as target standard deviation or sketch size in bytes, we could offer the same level of convenience here.

@wence-
wence- changed the base branch from main to release/26.08 July 17, 2026 15:55

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cpp/libcudf_streaming/include/cudf_streaming/bloom_filter.hpp`:
- Around line 58-64: Update the documentation for aligned_size in the bloom
filter interface to describe only storage alignment: state that it returns the
largest aligned size no greater than the input, including that small inputs may
produce zero, and clarify that callers must separately validate positivity and
filter policy limits.

In `@cpp/libcudf_streaming/tests/streaming/test_bloom_filter_config.cpp`:
- Around line 17-22: Update the AlignsStorageSize test expectations for
cudf_streaming::bloom_filter::aligned_size to verify ceiling alignment: assert
31 maps to 32, 32 remains 32, and 65 maps to 96.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 6ca63bf8-4fea-49c1-8f17-54e2cf0c4e05

📥 Commits

Reviewing files that changed from the base of the PR and between 51d84d7 and d115c3f.

📒 Files selected for processing (12)
  • cpp/include/cudf/reduction/bloom_filter.cuh
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q03.cpp
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q04.cpp
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q21.cpp
  • cpp/libcudf_streaming/include/cudf_streaming/bloom_filter.hpp
  • cpp/libcudf_streaming/include/cudf_streaming/detail/device_bloom_filter.hpp
  • cpp/libcudf_streaming/src/bloom_filter.cpp
  • cpp/libcudf_streaming/src/detail/device_bloom_filter.cu
  • cpp/libcudf_streaming/tests/CMakeLists.txt
  • cpp/libcudf_streaming/tests/streaming/test_bloom_filter.cu
  • cpp/libcudf_streaming/tests/streaming/test_bloom_filter_config.cpp
  • cpp/src/io/parquet/bloom_filter_reader.cu
🚧 Files skipped from review as they are similar to previous changes (9)
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q04.cpp
  • cpp/libcudf_streaming/tests/streaming/test_bloom_filter.cu
  • cpp/libcudf_streaming/tests/CMakeLists.txt
  • cpp/include/cudf/reduction/bloom_filter.cuh
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q03.cpp
  • cpp/libcudf_streaming/src/bloom_filter.cpp
  • cpp/libcudf_streaming/include/cudf_streaming/detail/device_bloom_filter.hpp
  • cpp/src/io/parquet/bloom_filter_reader.cu
  • cpp/libcudf_streaming/src/detail/device_bloom_filter.cu

Comment thread cpp/libcudf_streaming/include/cudf_streaming/bloom_filter.hpp
Comment thread cpp/libcudf_streaming/tests/streaming/test_bloom_filter_config.cpp
@wence- wence- added improvement Improvement / enhancement to an existing function breaking Breaking change and removed DO NOT MERGE Hold off on merging; see PR for details labels Jul 17, 2026
Rather than asking for a fitting number of blocks for an size, just require
the user to provide the size of the filter directly. Since it must be a
multiple of the storage type, also offer an aligned_size utility that takes
an input and makes that happen.

Additionally, share the new cuco parametric filter policy across cudf and
cudf-streaming.
@wence-
wence- force-pushed the wence/fix/bloom-filter-size branch from d115c3f to ff29c5a Compare July 22, 2026 15:59
@wence- wence- changed the title Rejig bloom filter sizing Rework approach to cudf-streaming bloom filter sizing Jul 22, 2026
@wence-

wence- commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

@PointKernel @mhaseeb123 are you happy with the file naming choice for the new shared filter policy .cuh header?

Comment thread cpp/include/cudf/reduction/bloom_filter.cuh

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
python/cudf_streaming/cudf_streaming/tests/test_bloom_filter.py (1)

195-200: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Migrate this test from the removed block-count API.

Line 199 still passes num_filter_blocks=BloomFilter.fitting_num_blocks(...); this migration replaces both with filter_size, so the regression test will fail against the updated binding.

Proposed fix
-        num_filter_blocks=BloomFilter.fitting_num_blocks(1 << 20),
+        filter_size=1 << 20,
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@python/cudf_streaming/cudf_streaming/tests/test_bloom_filter.py` around lines
195 - 200, Update the BloomFilter construction in test_bloom_filter.py to
replace the removed num_filter_blocks argument and
BloomFilter.fitting_num_blocks(...) call with the new filter_size argument,
preserving the intended 1 << 20 filter size for the regression test.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@python/cudf_streaming/cudf_streaming/tests/test_bloom_filter.py`:
- Around line 45-48: Update the assertions in test_aligned_size to match
BloomFilter.aligned_size’s round-up contract: expect 31 to produce 32 and 65 to
produce 96, while retaining the existing 32-to-32 expectation.

---

Outside diff comments:
In `@python/cudf_streaming/cudf_streaming/tests/test_bloom_filter.py`:
- Around line 195-200: Update the BloomFilter construction in
test_bloom_filter.py to replace the removed num_filter_blocks argument and
BloomFilter.fitting_num_blocks(...) call with the new filter_size argument,
preserving the intended 1 << 20 filter size for the regression test.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c42824ae-a351-4dee-8c4a-d475aae417c5

📥 Commits

Reviewing files that changed from the base of the PR and between d115c3f and ff29c5a.

📒 Files selected for processing (18)
  • cpp/include/cudf/reduction/bloom_filter.cuh
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q03.cpp
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q04.cpp
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q21.cpp
  • cpp/libcudf_streaming/include/cudf_streaming/bloom_filter.hpp
  • cpp/libcudf_streaming/include/cudf_streaming/detail/device_bloom_filter.hpp
  • cpp/libcudf_streaming/src/bloom_filter.cpp
  • cpp/libcudf_streaming/src/detail/device_bloom_filter.cu
  • cpp/libcudf_streaming/tests/CMakeLists.txt
  • cpp/libcudf_streaming/tests/streaming/test_bloom_filter.cu
  • cpp/libcudf_streaming/tests/streaming/test_bloom_filter_config.cpp
  • cpp/src/io/parquet/bloom_filter_reader.cu
  • cpp/tests/io/parquet_bloom_filter_test.cu
  • python/cudf_polars/cudf_polars/streaming/actor_graph/join.py
  • python/cudf_streaming/cudf_streaming/bloom_filter.pxd
  • python/cudf_streaming/cudf_streaming/bloom_filter.pyi
  • python/cudf_streaming/cudf_streaming/bloom_filter.pyx
  • python/cudf_streaming/cudf_streaming/tests/test_bloom_filter.py
🚧 Files skipped from review as they are similar to previous changes (15)
  • cpp/include/cudf/reduction/bloom_filter.cuh
  • cpp/libcudf_streaming/tests/CMakeLists.txt
  • cpp/tests/io/parquet_bloom_filter_test.cu
  • cpp/libcudf_streaming/tests/streaming/test_bloom_filter.cu
  • python/cudf_polars/cudf_polars/streaming/actor_graph/join.py
  • cpp/libcudf_streaming/src/bloom_filter.cpp
  • python/cudf_streaming/cudf_streaming/bloom_filter.pyi
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q21.cpp
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q03.cpp
  • python/cudf_streaming/cudf_streaming/bloom_filter.pyx
  • cpp/src/io/parquet/bloom_filter_reader.cu
  • cpp/libcudf_streaming/src/detail/device_bloom_filter.cu
  • cpp/libcudf_streaming/benchmarks/streaming/ndsh/q04.cpp
  • cpp/libcudf_streaming/include/cudf_streaming/bloom_filter.hpp
  • cpp/libcudf_streaming/include/cudf_streaming/detail/device_bloom_filter.hpp

Comment on lines +45 to +48
def test_aligned_size() -> None:
assert BloomFilter.aligned_size(31) == 0
assert BloomFilter.aligned_size(32) == 32
assert BloomFilter.aligned_size(65) == 64

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Fix the aligned_size expectations to round up.

Lines 46-48 assert round-down results (31 → 0, 65 → 64), but this API’s new contract rounds up to the storage-block multiple. Expect 31 → 32 and 65 → 96.

Proposed fix
-    assert BloomFilter.aligned_size(31) == 0
+    assert BloomFilter.aligned_size(31) == 32
     assert BloomFilter.aligned_size(32) == 32
-    assert BloomFilter.aligned_size(65) == 64
+    assert BloomFilter.aligned_size(65) == 96
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
def test_aligned_size() -> None:
assert BloomFilter.aligned_size(31) == 0
assert BloomFilter.aligned_size(32) == 32
assert BloomFilter.aligned_size(65) == 64
def test_aligned_size() -> None:
assert BloomFilter.aligned_size(31) == 32
assert BloomFilter.aligned_size(32) == 32
assert BloomFilter.aligned_size(65) == 96
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@python/cudf_streaming/cudf_streaming/tests/test_bloom_filter.py` around lines
45 - 48, Update the assertions in test_aligned_size to match
BloomFilter.aligned_size’s round-up contract: expect 31 to produce 32 and 65 to
produce 96, while retaining the existing 32-to-32 expectation.

@PointKernel

Copy link
Copy Markdown
Member

@PointKernel @mhaseeb123 are you happy with the file naming choice for the new shared filter policy .cuh header?

Looks good. As for the location, the public utilities folder could also be an option, but I don't have a strong opinion either way.

@mhaseeb123

Copy link
Copy Markdown
Contributor

@PointKernel @mhaseeb123 are you happy with the file naming choice for the new shared filter policy .cuh header?

LGTM!

@vuule vuule added the 5 - Ready to Merge Testing and reviews complete, ready to merge label Jul 23, 2026
@vyasr

vyasr commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit f0a24f4 into NVIDIA:release/26.08 Jul 23, 2026
262 of 264 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python Jul 23, 2026
@wence-
wence- deleted the wence/fix/bloom-filter-size branch July 23, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 - Ready to Merge Testing and reviews complete, ready to merge breaking Breaking change CMake CMake build issue cudf-polars Issues specific to cudf-polars improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants