Skip to content

Add approx_distinct_count API to cudf_streaming - #23522

Merged
rapids-bot[bot] merged 2 commits into
NVIDIA:mainfrom
wence-:wence/fea/approx-distinct
Aug 7, 2026
Merged

Add approx_distinct_count API to cudf_streaming#23522
rapids-bot[bot] merged 2 commits into
NVIDIA:mainfrom
wence-:wence/fea/approx-distinct

Conversation

@wence-

@wence- wence- commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

We will use this to estimate cardinalities of tables in join prefiltering. Hence to that end also introduce ChunkSampler in cudf-polars streaming to manage the various input/output channels.

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 August 4, 2026 08:40
@wence-
wence- requested a review from nirandaperera August 4, 2026 08:40
@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 Aug 4, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Aug 4, 2026
@wence- wence- added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 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

Summary by CodeRabbit

  • New Features

    • Added distributed approximate distinct-count estimation with row-count and cardinality results.
    • Exposed asynchronous estimation APIs for Python and C++.
    • Added configurable precision, selected-column sampling, and optional input forwarding.
    • Integrated cardinality-aware sampling into streaming join strategy selection.
  • Bug Fixes

    • Sample completeness is now reported only when all ranks finish processing.
  • Tests

    • Added coverage for empty inputs, precision validation, sampling, forwarding, and distributed estimates.

Walkthrough

Adds distributed approximate distinct-count estimation in libcudf streaming, exposes it through Cython, and integrates it with Polars chunk sampling. The implementation supports selected columns, sampled-chunk forwarding, distributed reduction, precision validation, and completeness tracking.

Changes

Cardinality estimation

Layer / File(s) Summary
Native estimator and distributed reduction
cpp/libcudf_streaming/include/..., cpp/libcudf_streaming/src/..., cpp/libcudf_streaming/tests/...
Adds the native estimator, CUDA helpers, asynchronous chunk processing, distributed reduction, result messaging, build wiring, and tests.
Python cardinality API
python/cudf_streaming/...
Adds Cython bindings, type stubs, package exports, asynchronous estimation, sampled forwarding, and Python tests.
Cardinality-aware sampling
python/cudf_polars/cudf_polars/streaming/actor_graph/...
Adds ChunkSampler, cardinality metadata, completeness aggregation, selected-column sampling, and synchronous strategy selection.

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

Possibly related PRs

  • rapidsai/cudf#22765: Introduces explicit row-count semantics used by this cardinality estimation implementation.

Suggested labels: feature request

Suggested reviewers: nirandaperera, vyasr, bdice

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 36.59% 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
Title check ✅ Passed The title clearly identifies the main change: adding the approximate distinct-count API to cudf_streaming.
Description check ✅ Passed The description explains the cardinality-estimation use case and the related ChunkSampler changes, which match the changeset.
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.
✨ 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.

Actionable comments posted: 3

🧹 Nitpick comments (7)
cpp/libcudf_streaming/src/detail/approx_distinct_count.cu (1)

15-26: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use CUDF_KERNEL instead of raw __global__.

Both kernels declare __global__ directly. The guidelines require the CUDF_KERNEL macro, preferably with __launch_bounds__.

♻️ Proposed change
+#include <cudf/detail/utilities/integer_utils.hpp>
+#include <cudf/utilities/export.hpp>
+
-__global__ void set_value_kernel(std::byte* data, std::size_t offset, std::uint64_t value)
+CUDF_KERNEL void __launch_bounds__(1)
+  set_value_kernel(std::byte* data, std::size_t offset, std::uint64_t value)
 {
   if (threadIdx.x == 0) { *reinterpret_cast<std::uint64_t*>(data + offset) = value; }
 }
 
-__global__ void add_values_kernel(std::byte const* left, std::byte* right, std::size_t offset)
+CUDF_KERNEL void __launch_bounds__(1)
+  add_values_kernel(std::byte const* left, std::byte* right, std::size_t offset)
 {

Use the header that actually defines CUDF_KERNEL in this repository instead of the placeholder includes above.

As per coding guidelines: "Use CUDF_KERNEL rather than raw __global__, preferably with __launch_bounds__."

🤖 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/src/detail/approx_distinct_count.cu` around lines 15 -
26, Replace the raw __global__ qualifiers on set_value_kernel and
add_values_kernel with the repository’s CUDF_KERNEL macro, adding
__launch_bounds__ if consistent with nearby kernel conventions. Include the
header that defines CUDF_KERNEL and preserve both kernels’ existing behavior.

Source: Coding guidelines

cpp/libcudf_streaming/include/cudf_streaming/approx_distinct_count.hpp (1)

104-108: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document the estimator lifetime requirement for the returned actor.

estimate is a coroutine member function. The coroutine frame copies the arguments, but it stores only this for the member state. The estimator object must stay alive until the actor completes, otherwise the coroutine dereferences a destroyed object after a suspension point. Add this requirement to the doc block so callers of the Python binding and the Polars sampler keep the estimator alive.

📝 Proposed documentation addition
    * `@param` column_indices Columns whose row tuples are counted. An empty vector selects all
    * columns.
    * `@return` Coroutine representing the estimation.
+   *
+   * `@note` The estimator must outlive the returned actor. The coroutine accesses estimator state
+   * after suspension points.
    */
🤖 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/include/cudf_streaming/approx_distinct_count.hpp`
around lines 104 - 108, Update the documentation for the coroutine member
function estimate to state that the estimator instance must remain alive until
the returned actor completes, because the coroutine retains this across
suspension points. Ensure the requirement is visible to callers, including
Python bindings and the Polars sampler, without changing the function signature
or behavior.
cpp/libcudf_streaming/include/cudf_streaming/detail/approx_distinct_count.hpp (1)

15-23: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add doxygen blocks and state the alignment precondition.

Both declarations lack doxygen comments. The corresponding kernels in src/detail/approx_distinct_count.cu reinterpret data + offset as std::uint64_t*, so offset must produce an 8-byte aligned address. Document that precondition and the device-memory requirement for the pointers.

📝 Proposed documentation
+/**
+ * `@brief` Write a 64-bit value into device memory at a byte offset.
+ *
+ * `@param` data Device pointer to the target storage.
+ * `@param` offset Byte offset into `@p` data. Must yield an 8-byte aligned address.
+ * `@param` value Value to write.
+ * `@param` stream CUDA stream used for the write.
+ */
 void set_value(std::byte* data,
                std::size_t offset,
                std::uint64_t value,
                rmm::cuda_stream_view stream);
 
+/**
+ * `@brief` Add the 64-bit value at `@p` offset in `@p` left into `@p` right.
+ *
+ * `@param` left Device pointer to the source storage.
+ * `@param` right Device pointer to the destination storage.
+ * `@param` offset Byte offset into both buffers. Must yield an 8-byte aligned address.
+ * `@param` stream CUDA stream used for the update.
+ */
 void add_values(std::byte const* left,
                 std::byte* right,
                 std::size_t offset,
                 rmm::cuda_stream_view stream);

As per coding guidelines: "Use doxygen as a documentation generator and linter for C++ and CUDA code."

🤖 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/include/cudf_streaming/detail/approx_distinct_count.hpp`
around lines 15 - 23, Add Doxygen comments for set_value and add_values
describing their parameters, including that the data pointers reference device
memory and offset must produce an 8-byte-aligned address for the uint64_t
access; document the stream parameter and each function’s operation without
changing their declarations or behavior.

Source: Coding guidelines

cpp/libcudf_streaming/src/approx_distinct_count.cpp (1)

6-29: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Include a header for every used symbol in the new sources. Both new translation units rely on transitive includes for symbols they name directly. The shared root cause is incomplete include-what-you-use hygiene in this PR.

  • cpp/libcudf_streaming/src/approx_distinct_count.cpp#L6-L29: add <stdexcept> for std::invalid_argument (line 55) and <cuda/std/cstddef> for cuda::std::byte (lines 110, 142, 146, 158).
  • cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp#L6-L23: add <cstddef> for std::size_t, cudf/column/column.hpp for cudf::column, the rapidsmpf header that declares safe_cast, and rapidsmpf/streaming/core/channel.hpp for channel creation.

As per coding guidelines: "include headers directly for every used symbol without unused or incorrectly styled includes."

🤖 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/src/approx_distinct_count.cpp` around lines 6 - 29,
Update both affected translation units to include headers directly for every
symbol they use: in cpp/libcudf_streaming/src/approx_distinct_count.cpp#L6-L29
add <stdexcept> for std::invalid_argument and <cuda/std/cstddef> for
cuda::std::byte; in
cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp#L6-L23 add
<cstddef> for std::size_t, cudf/column/column.hpp for cudf::column, the
rapidsmpf header declaring safe_cast, and rapidsmpf/streaming/core/channel.hpp
for channel creation. Remove or avoid any unused or incorrectly styled includes.

Source: Coding guidelines

cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp (1)

126-134: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for the valid precision boundaries and for null inputs.

RejectsInvalidPrecision checks 3 and 19. Add cases for 4 and 18 to pin the accepted range. The public header states that nulls and NaNs enter the sketch. Add a test with a null-containing column to lock that behavior.

🤖 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_approx_distinct_count.cpp` around
lines 126 - 134, The RejectsInvalidPrecision test currently only verifies that
precision values 3 and 19 are rejected, leaving the valid boundary conditions
untested. Add test cases that verify precision values 4 and 18 are accepted
without throwing exceptions to establish the correct precision range.
Additionally, create a separate test case that constructs a
cardinality_estimator with a column containing null values to verify the
documented behavior that nulls and NaNs are properly accepted and processed by
the sketch.
python/cudf_streaming/cudf_streaming/tests/test_approx_distinct_count.py (1)

120-131: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for column_indices and for null values.

The sample() helper accepts column_indices, but no test passes a non-empty value. The selected-columns path of the new API is therefore untested. Add a test with a multi-column table that estimates on a subset of columns, and assert that the distinct count reflects only those columns. Add a case with an all-null column as well, because the native actor fixes null_handling and nan_handling and that behavior is not asserted anywhere.

As per coding guidelines: "Ensure test files provide comprehensive edge case coverage (empty, all-null, single-element, mixed types)".

🤖 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_approx_distinct_count.py`
around lines 120 - 131, Extend coverage around sample() by adding tests for
non-empty column_indices using a multi-column table, asserting distinct_count
reflects only the selected columns, and for an all-null column to verify null
handling. Anchor the additions near test_estimate_forwards_input and follow
existing Context, Communicator, make_table, and assertion patterns; include
relevant empty, single-element, or mixed-type cases only where needed to
exercise these paths.

Source: Coding guidelines

python/cudf_streaming/cudf_streaming/approx_distinct_count.pyi (1)

13-16: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use a concrete static signature for CardinalityEstimate.from_message. The implementation is a @staticmethod and always constructs CardinalityEstimate; use message: Message[CardinalityEstimate] and return CardinalityEstimate.

🤖 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/approx_distinct_count.pyi` around lines
13 - 16, Update the from_message declaration in the CardinalityEstimate stub to
use the concrete static signature: remove the classmethod receiver, accept
Message[CardinalityEstimate], and retain CardinalityEstimate as the return type,
matching the implementation’s `@staticmethod` behavior.
🤖 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/src/approx_distinct_count.cpp`:
- Around line 162-167: Update the row-count transfer in the distinct-count
estimation path to use a pinned host vector and the span-based cuda_memcpy API
instead of copying into stack variable row_count via memcpy_async. Preserve the
existing device offset, byte size, stream synchronization, and returned pair by
extracting the copied value from the pinned vector.

In `@python/cudf_polars/cudf_polars/streaming/actor_graph/utils.py`:
- Around line 1061-1068: Update the Returns section of the affected docstring so
the third return type is int instead of rows, and correct its description to say
“Number of rows in the sampled chunks.”
- Around line 1134-1144: Guard the cardinality-estimator result in the
`cardinality_estimator` branch before calling
`CardinalityEstimate.from_message(msg)`, raising a clear `RuntimeError` when
`msg is None`; also verify or adjust the `ch_cardinality` consumption so the
rapidsmpf channel cannot leave the estimator’s output drain blocked, following
the established receive-loop and `drain()` pattern where required.

---

Nitpick comments:
In `@cpp/libcudf_streaming/include/cudf_streaming/approx_distinct_count.hpp`:
- Around line 104-108: Update the documentation for the coroutine member
function estimate to state that the estimator instance must remain alive until
the returned actor completes, because the coroutine retains this across
suspension points. Ensure the requirement is visible to callers, including
Python bindings and the Polars sampler, without changing the function signature
or behavior.

In
`@cpp/libcudf_streaming/include/cudf_streaming/detail/approx_distinct_count.hpp`:
- Around line 15-23: Add Doxygen comments for set_value and add_values
describing their parameters, including that the data pointers reference device
memory and offset must produce an 8-byte-aligned address for the uint64_t
access; document the stream parameter and each function’s operation without
changing their declarations or behavior.

In `@cpp/libcudf_streaming/src/approx_distinct_count.cpp`:
- Around line 6-29: Update both affected translation units to include headers
directly for every symbol they use: in
cpp/libcudf_streaming/src/approx_distinct_count.cpp#L6-L29 add <stdexcept> for
std::invalid_argument and <cuda/std/cstddef> for cuda::std::byte; in
cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp#L6-L23 add
<cstddef> for std::size_t, cudf/column/column.hpp for cudf::column, the
rapidsmpf header declaring safe_cast, and rapidsmpf/streaming/core/channel.hpp
for channel creation. Remove or avoid any unused or incorrectly styled includes.

In `@cpp/libcudf_streaming/src/detail/approx_distinct_count.cu`:
- Around line 15-26: Replace the raw __global__ qualifiers on set_value_kernel
and add_values_kernel with the repository’s CUDF_KERNEL macro, adding
__launch_bounds__ if consistent with nearby kernel conventions. Include the
header that defines CUDF_KERNEL and preserve both kernels’ existing behavior.

In `@cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp`:
- Around line 126-134: The RejectsInvalidPrecision test currently only verifies
that precision values 3 and 19 are rejected, leaving the valid boundary
conditions untested. Add test cases that verify precision values 4 and 18 are
accepted without throwing exceptions to establish the correct precision range.
Additionally, create a separate test case that constructs a
cardinality_estimator with a column containing null values to verify the
documented behavior that nulls and NaNs are properly accepted and processed by
the sketch.

In `@python/cudf_streaming/cudf_streaming/approx_distinct_count.pyi`:
- Around line 13-16: Update the from_message declaration in the
CardinalityEstimate stub to use the concrete static signature: remove the
classmethod receiver, accept Message[CardinalityEstimate], and retain
CardinalityEstimate as the return type, matching the implementation’s
`@staticmethod` behavior.

In `@python/cudf_streaming/cudf_streaming/tests/test_approx_distinct_count.py`:
- Around line 120-131: Extend coverage around sample() by adding tests for
non-empty column_indices using a multi-column table, asserting distinct_count
reflects only the selected columns, and for an all-null column to verify null
handling. Anchor the additions near test_estimate_forwards_input and follow
existing Context, Communicator, make_table, and assertion patterns; include
relevant empty, single-element, or mixed-type cases only where needed to
exercise these paths.
🪄 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: b30b6143-e522-46e3-b763-8d93ef55e622

📥 Commits

Reviewing files that changed from the base of the PR and between 777fcd5 and 9b16706.

📒 Files selected for processing (16)
  • cpp/libcudf_streaming/CMakeLists.txt
  • cpp/libcudf_streaming/include/cudf_streaming/approx_distinct_count.hpp
  • cpp/libcudf_streaming/include/cudf_streaming/detail/approx_distinct_count.hpp
  • cpp/libcudf_streaming/src/approx_distinct_count.cpp
  • cpp/libcudf_streaming/src/detail/approx_distinct_count.cu
  • cpp/libcudf_streaming/tests/CMakeLists.txt
  • cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp
  • python/cudf_polars/cudf_polars/streaming/actor_graph/join.py
  • python/cudf_polars/cudf_polars/streaming/actor_graph/utils.py
  • python/cudf_streaming/CMakeLists.txt
  • python/cudf_streaming/cudf_streaming/__init__.pxd
  • python/cudf_streaming/cudf_streaming/__init__.py
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pxd
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyi
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyx
  • python/cudf_streaming/cudf_streaming/tests/test_approx_distinct_count.py

Comment thread cpp/libcudf_streaming/src/approx_distinct_count.cpp Outdated
Comment thread python/cudf_polars/cudf_polars/streaming/actor_graph/utils.py Outdated
Comment thread python/cudf_polars/cudf_polars/streaming/actor_graph/utils.py
@wence-
wence- force-pushed the wence/fea/approx-distinct branch 3 times, most recently from 2d3a545 to 956135a Compare August 4, 2026 09:39

@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

🧹 Nitpick comments (1)
cpp/libcudf_streaming/src/approx_distinct_count.cpp (1)

6-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add direct headers for referenced types.

Both files rely on transitive headers. This makes builds depend on unrelated header internals.

  • cpp/libcudf_streaming/src/approx_distinct_count.cpp#L6-L31: Add <cuda/std/cstddef> for cuda::std::byte, <rmm/device_buffer.hpp> for rmm::device_buffer, and <stdexcept> for std::invalid_argument.
  • cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp#L16-L23: Add <cstddef> for std::size_t and <stdexcept> for std::invalid_argument.

As per coding guidelines: "include headers directly for every used symbol without unused or incorrectly styled includes."

🤖 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/src/approx_distinct_count.cpp` around lines 6 - 31,
Update the includes in cpp/libcudf_streaming/src/approx_distinct_count.cpp
(lines 6-31) to directly include <cuda/std/cstddef> for cuda::std::byte,
<rmm/device_buffer.hpp> for rmm::device_buffer, and <stdexcept> for
std::invalid_argument. Also update
cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp (lines
16-23) to directly include <cstddef> for std::size_t and <stdexcept> for
std::invalid_argument, without adding unused headers.

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.

Inline comments:
In `@cpp/libcudf_streaming/src/approx_distinct_count.cpp`:
- Around line 165-171: Update the row-count copy in the surrounding
distinct-count implementation to remove the unused row_count variable and pass
tmp.size() as the cudf::device_span element count instead of sizeof(row_count),
keeping the one-element destination and cuda_memcpy flow unchanged.

In `@cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp`:
- Around line 33-34: Update the test setup around values in
test_approx_distinct_count to copy the original range into a separate container
before appending it, avoiding self-range insertion while preserving the
duplicated values.

---

Nitpick comments:
In `@cpp/libcudf_streaming/src/approx_distinct_count.cpp`:
- Around line 6-31: Update the includes in
cpp/libcudf_streaming/src/approx_distinct_count.cpp (lines 6-31) to directly
include <cuda/std/cstddef> for cuda::std::byte, <rmm/device_buffer.hpp> for
rmm::device_buffer, and <stdexcept> for std::invalid_argument. Also update
cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp (lines
16-23) to directly include <cstddef> for std::size_t and <stdexcept> for
std::invalid_argument, without adding unused headers.
🪄 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: 5a4f935b-a9b9-4931-83ac-146b3fd69753

📥 Commits

Reviewing files that changed from the base of the PR and between 9b16706 and 2d3a545.

📒 Files selected for processing (16)
  • cpp/libcudf_streaming/CMakeLists.txt
  • cpp/libcudf_streaming/include/cudf_streaming/approx_distinct_count.hpp
  • cpp/libcudf_streaming/include/cudf_streaming/detail/approx_distinct_count.hpp
  • cpp/libcudf_streaming/src/approx_distinct_count.cpp
  • cpp/libcudf_streaming/src/detail/approx_distinct_count.cu
  • cpp/libcudf_streaming/tests/CMakeLists.txt
  • cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp
  • python/cudf_polars/cudf_polars/streaming/actor_graph/join.py
  • python/cudf_polars/cudf_polars/streaming/actor_graph/utils.py
  • python/cudf_streaming/CMakeLists.txt
  • python/cudf_streaming/cudf_streaming/__init__.pxd
  • python/cudf_streaming/cudf_streaming/__init__.py
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pxd
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyi
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyx
  • python/cudf_streaming/cudf_streaming/tests/test_approx_distinct_count.py
🚧 Files skipped from review as they are similar to previous changes (13)
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyi
  • python/cudf_streaming/cudf_streaming/init.py
  • cpp/libcudf_streaming/src/detail/approx_distinct_count.cu
  • cpp/libcudf_streaming/CMakeLists.txt
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pxd
  • python/cudf_streaming/CMakeLists.txt
  • python/cudf_polars/cudf_polars/streaming/actor_graph/join.py
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyx
  • python/cudf_polars/cudf_polars/streaming/actor_graph/utils.py
  • python/cudf_streaming/cudf_streaming/init.pxd
  • cpp/libcudf_streaming/tests/CMakeLists.txt
  • python/cudf_streaming/cudf_streaming/tests/test_approx_distinct_count.py
  • cpp/libcudf_streaming/include/cudf_streaming/approx_distinct_count.hpp

Comment thread cpp/libcudf_streaming/src/approx_distinct_count.cpp Outdated
Comment thread cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp Outdated
@wence-
wence- force-pushed the wence/fea/approx-distinct branch from 956135a to d4b5b5a Compare August 4, 2026 09:46

@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

🧹 Nitpick comments (3)
cpp/libcudf_streaming/src/detail/approx_distinct_count.cu (1)

15-22: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use CUDF_KERNEL for both kernel declarations.

Line 15 and Line 20 use raw __global__ declarations. Replace both declarations with CUDF_KERNEL. Include the header that directly declares CUDF_KERNEL.

As per coding guidelines, “Use CUDF_KERNEL rather than raw __global__.”

🤖 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/src/detail/approx_distinct_count.cu` around lines 15 -
22, Replace the raw __global__ declarations for set_value_kernel and
add_values_kernel with CUDF_KERNEL, and include the header that directly
declares CUDF_KERNEL.

Source: Coding guidelines

cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp (2)

117-123: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Assert the forwarded table payload.

The test checks only sampled.front().sequence_number(). It does not prove that the forwarded message contains the original table. Release the sampled table_chunk and verify its row count, column count, and values.

🤖 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_approx_distinct_count.cpp` around
lines 117 - 123, Extend the test around sampled.front() to release the forwarded
table_chunk payload and assert the original table’s row count, column count, and
values, while retaining the existing sequence_number check and estimate
assertions.

21-23: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add direct standard-library headers.

Add <cstddef>, <stdexcept>, and <utility> for the direct uses of std::size_t, std::invalid_argument, and std::move.

🤖 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_approx_distinct_count.cpp` around
lines 21 - 23, Add the direct standard-library headers <cstddef>, <stdexcept>,
and <utility> to support the file’s uses of std::size_t, std::invalid_argument,
and std::move.

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.

Inline comments:
In `@cpp/libcudf_streaming/src/detail/approx_distinct_count.cu`:
- Around line 27-36: Add RAPIDSMPF_EXPECTS validation for non-null device
pointers at the start of both set_value and add_values, checking data in
set_value and both left and right in add_values before launching their kernels.
Preserve the existing launch and CUDA error checks.

---

Nitpick comments:
In `@cpp/libcudf_streaming/src/detail/approx_distinct_count.cu`:
- Around line 15-22: Replace the raw __global__ declarations for
set_value_kernel and add_values_kernel with CUDF_KERNEL, and include the header
that directly declares CUDF_KERNEL.

In `@cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp`:
- Around line 117-123: Extend the test around sampled.front() to release the
forwarded table_chunk payload and assert the original table’s row count, column
count, and values, while retaining the existing sequence_number check and
estimate assertions.
- Around line 21-23: Add the direct standard-library headers <cstddef>,
<stdexcept>, and <utility> to support the file’s uses of std::size_t,
std::invalid_argument, and std::move.
🪄 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: e90df714-4711-4a45-9921-ec8f915e48f0

📥 Commits

Reviewing files that changed from the base of the PR and between 2d3a545 and 956135a.

📒 Files selected for processing (16)
  • cpp/libcudf_streaming/CMakeLists.txt
  • cpp/libcudf_streaming/include/cudf_streaming/approx_distinct_count.hpp
  • cpp/libcudf_streaming/include/cudf_streaming/detail/approx_distinct_count.hpp
  • cpp/libcudf_streaming/src/approx_distinct_count.cpp
  • cpp/libcudf_streaming/src/detail/approx_distinct_count.cu
  • cpp/libcudf_streaming/tests/CMakeLists.txt
  • cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp
  • python/cudf_polars/cudf_polars/streaming/actor_graph/join.py
  • python/cudf_polars/cudf_polars/streaming/actor_graph/utils.py
  • python/cudf_streaming/CMakeLists.txt
  • python/cudf_streaming/cudf_streaming/__init__.pxd
  • python/cudf_streaming/cudf_streaming/__init__.py
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pxd
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyi
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyx
  • python/cudf_streaming/cudf_streaming/tests/test_approx_distinct_count.py
🚧 Files skipped from review as they are similar to previous changes (12)
  • cpp/libcudf_streaming/tests/CMakeLists.txt
  • python/cudf_streaming/CMakeLists.txt
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyi
  • python/cudf_streaming/cudf_streaming/init.py
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyx
  • cpp/libcudf_streaming/CMakeLists.txt
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pxd
  • python/cudf_polars/cudf_polars/streaming/actor_graph/join.py
  • cpp/libcudf_streaming/src/approx_distinct_count.cpp
  • python/cudf_streaming/cudf_streaming/tests/test_approx_distinct_count.py
  • python/cudf_streaming/cudf_streaming/init.pxd
  • python/cudf_polars/cudf_polars/streaming/actor_graph/utils.py

Comment thread cpp/libcudf_streaming/src/detail/approx_distinct_count.cu
@wence-
wence- force-pushed the wence/fea/approx-distinct branch from d4b5b5a to af8eec1 Compare August 4, 2026 09:47

@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_approx_distinct_count.cpp (1)

127-135: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Consider adding a valid-boundary precision test.

RejectsInvalidPrecision checks that precision 3 and 19 throw. It does not check that the nearest valid boundary values (4 and 18, based on the implied valid range) construct successfully. Add a case that constructs cardinality_estimator with precision 4 and 18 and expects no throw, to guard the boundary in both directions.

♻️ Proposed addition
 TEST_F(CardinalityEstimatorTest, RejectsInvalidPrecision)
 {
   EXPECT_THROW(
     cudf_streaming::cardinality_estimator(ctx, GlobalEnvironment->comm_, rapidsmpf::OpID{0}, 3),
     std::invalid_argument);
   EXPECT_THROW(
     cudf_streaming::cardinality_estimator(ctx, GlobalEnvironment->comm_, rapidsmpf::OpID{0}, 19),
     std::invalid_argument);
+  EXPECT_NO_THROW(
+    cudf_streaming::cardinality_estimator(ctx, GlobalEnvironment->comm_, rapidsmpf::OpID{0}, 4));
+  EXPECT_NO_THROW(
+    cudf_streaming::cardinality_estimator(ctx, GlobalEnvironment->comm_, rapidsmpf::OpID{0}, 18));
 }
🤖 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_approx_distinct_count.cpp` around
lines 127 - 135, Extend the CardinalityEstimatorTest coverage around
RejectsInvalidPrecision by adding successful construction checks for the valid
boundary precisions 4 and 18. Verify cardinality_estimator does not throw for
either value while preserving the existing invalid-precision assertions for 3
and 19.
🤖 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_approx_distinct_count.cpp`:
- Around line 127-135: Extend the CardinalityEstimatorTest coverage around
RejectsInvalidPrecision by adding successful construction checks for the valid
boundary precisions 4 and 18. Verify cardinality_estimator does not throw for
either value while preserving the existing invalid-precision assertions for 3
and 19.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 33a5393c-87a0-406f-be8b-6544b4339da4

📥 Commits

Reviewing files that changed from the base of the PR and between 956135a and af8eec1.

📒 Files selected for processing (16)
  • cpp/libcudf_streaming/CMakeLists.txt
  • cpp/libcudf_streaming/include/cudf_streaming/approx_distinct_count.hpp
  • cpp/libcudf_streaming/include/cudf_streaming/detail/approx_distinct_count.hpp
  • cpp/libcudf_streaming/src/approx_distinct_count.cpp
  • cpp/libcudf_streaming/src/detail/approx_distinct_count.cu
  • cpp/libcudf_streaming/tests/CMakeLists.txt
  • cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp
  • python/cudf_polars/cudf_polars/streaming/actor_graph/join.py
  • python/cudf_polars/cudf_polars/streaming/actor_graph/utils.py
  • python/cudf_streaming/CMakeLists.txt
  • python/cudf_streaming/cudf_streaming/__init__.pxd
  • python/cudf_streaming/cudf_streaming/__init__.py
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pxd
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyi
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyx
  • python/cudf_streaming/cudf_streaming/tests/test_approx_distinct_count.py
🚧 Files skipped from review as they are similar to previous changes (15)
  • cpp/libcudf_streaming/CMakeLists.txt
  • python/cudf_streaming/cudf_streaming/init.py
  • python/cudf_streaming/cudf_streaming/init.pxd
  • cpp/libcudf_streaming/tests/CMakeLists.txt
  • python/cudf_streaming/CMakeLists.txt
  • cpp/libcudf_streaming/include/cudf_streaming/detail/approx_distinct_count.hpp
  • python/cudf_polars/cudf_polars/streaming/actor_graph/join.py
  • python/cudf_streaming/cudf_streaming/tests/test_approx_distinct_count.py
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyi
  • cpp/libcudf_streaming/include/cudf_streaming/approx_distinct_count.hpp
  • cpp/libcudf_streaming/src/detail/approx_distinct_count.cu
  • python/cudf_polars/cudf_polars/streaming/actor_graph/utils.py
  • cpp/libcudf_streaming/src/approx_distinct_count.cpp
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pxd
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyx

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

I skimmed through the C++ headers, but not the implementation.

The python changes all look good though maybe some more tests would be warranted.



@dataclass(frozen=True)
class ChunkSampler:

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.

Thoughts on adding tests dedicated to this class? Mostly, I'm worried about the is_complete and how that interacts with the statistics we compute. The code looks correct, but I'd be more comfortable with some unit tests.

I don't see existing tests for TableSizeStats, though I might have missed them.

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.

Mostly, I'm worried about the is_complete and how that interacts with the statistics we compute.

I don't know what you mean here.

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 am generally somewhat leery about adding tests for internals like this. Since the object is not part of the public API.

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.

https://github.com/rapidsai/cudf/pull/23522/changes#diff-176746e532fa012a79d93db9180e0c4f09ac148678419340b8398a5ab6671641R1148-R1154 is where the value we return for total_size and total_rows depends on whether our sample covered all the messages.

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'm not sure what is actionable here.

Comment thread python/cudf_polars/cudf_polars/streaming/actor_graph/join.py
@wence-
wence- force-pushed the wence/fea/approx-distinct branch from af8eec1 to 95d95c4 Compare August 6, 2026 11:52
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@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

🧹 Nitpick comments (3)
cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp (3)

21-23: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add direct headers for standard-library symbols.

This file uses std::size_t, std::move, and std::invalid_argument, but it relies on transitive includes. Add <cstddef>, <stdexcept>, and <utility> directly.

As per coding guidelines, include headers directly for every used symbol without unused or incorrectly styled includes.

Proposed fix
+#include <cstddef>
 `#include` <cstdint>
 `#include` <memory>
+#include <stdexcept>
+#include <utility>
 `#include` <vector>
🤖 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_approx_distinct_count.cpp` around
lines 21 - 23, Update the include list in test_approx_distinct_count.cpp to
directly add <cstddef> for std::size_t, <stdexcept> for std::invalid_argument,
and <utility> for std::move, while retaining only correctly styled headers
required by the file.

Source: Coding guidelines


118-124: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Assert the sampled table contents.

The test checks only the sampled message count and sequence number. It does not verify the selected column, row values, or forwarded table. Extract the sampled cudf_streaming::table_chunk and assert the shape and values required by the channel contract.

🤖 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_approx_distinct_count.cpp` around
lines 118 - 124, Extend the sampled-message assertions in the test around
sampled.front() to extract its cudf_streaming::table_chunk and validate the
channel contract: confirm the selected column, table shape, row values, and
forwarded table contents in addition to the existing count and sequence-number
checks. Preserve the existing cardinality estimate assertions.

31-35: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Use rank-specific values to test the global union.

Every rank inserts the same values. A reducer that skips cross-rank sketch merging can still produce the expected distinct count. Build disjoint or partially overlapping ranges using each rank's identity, then assert the resulting global union size separately from the global row count.

🤖 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_approx_distinct_count.cpp` around
lines 31 - 35, Update the test data setup around values and dups to incorporate
each rank’s identity, creating disjoint or partially overlapping value ranges
across ranks so incorrect cross-rank sketch merging cannot pass. Assert the
global distinct-union size independently from the global row count, preserving
the existing repetition behavior.
🤖 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_polars/cudf_polars/streaming/actor_graph/utils.py`:
- Around line 1147-1159: Update the sampling logic near the `sample_count`
calculation to set `is_complete` when `sample_count` equals the expected local
chunk count (`self.ch_in_chunk_count`), including the `max_chunks` case where no
`None` sentinel is received. Ensure the updated completion state is used by the
existing size, row, total_chunks, and `TableSizeStats` calculations.

---

Nitpick comments:
In `@cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp`:
- Around line 21-23: Update the include list in test_approx_distinct_count.cpp
to directly add <cstddef> for std::size_t, <stdexcept> for
std::invalid_argument, and <utility> for std::move, while retaining only
correctly styled headers required by the file.
- Around line 118-124: Extend the sampled-message assertions in the test around
sampled.front() to extract its cudf_streaming::table_chunk and validate the
channel contract: confirm the selected column, table shape, row values, and
forwarded table contents in addition to the existing count and sequence-number
checks. Preserve the existing cardinality estimate assertions.
- Around line 31-35: Update the test data setup around values and dups to
incorporate each rank’s identity, creating disjoint or partially overlapping
value ranges across ranks so incorrect cross-rank sketch merging cannot pass.
Assert the global distinct-union size independently from the global row count,
preserving the existing repetition behavior.
🪄 Autofix

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: 426e1b21-5a79-450b-aa89-38714bb49fc4

📥 Commits

Reviewing files that changed from the base of the PR and between 89de7b4 and 95d95c4.

📒 Files selected for processing (16)
  • cpp/libcudf_streaming/CMakeLists.txt
  • cpp/libcudf_streaming/include/cudf_streaming/approx_distinct_count.hpp
  • cpp/libcudf_streaming/include/cudf_streaming/detail/approx_distinct_count.hpp
  • cpp/libcudf_streaming/src/approx_distinct_count.cpp
  • cpp/libcudf_streaming/src/detail/approx_distinct_count.cu
  • cpp/libcudf_streaming/tests/CMakeLists.txt
  • cpp/libcudf_streaming/tests/streaming/test_approx_distinct_count.cpp
  • python/cudf_polars/cudf_polars/streaming/actor_graph/join.py
  • python/cudf_polars/cudf_polars/streaming/actor_graph/utils.py
  • python/cudf_streaming/CMakeLists.txt
  • python/cudf_streaming/cudf_streaming/__init__.pxd
  • python/cudf_streaming/cudf_streaming/__init__.py
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pxd
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyi
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyx
  • python/cudf_streaming/cudf_streaming/tests/test_approx_distinct_count.py
🚧 Files skipped from review as they are similar to previous changes (14)
  • python/cudf_streaming/cudf_streaming/init.pxd
  • cpp/libcudf_streaming/include/cudf_streaming/detail/approx_distinct_count.hpp
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyi
  • cpp/libcudf_streaming/tests/CMakeLists.txt
  • python/cudf_streaming/cudf_streaming/init.py
  • python/cudf_streaming/CMakeLists.txt
  • python/cudf_polars/cudf_polars/streaming/actor_graph/join.py
  • cpp/libcudf_streaming/src/detail/approx_distinct_count.cu
  • cpp/libcudf_streaming/CMakeLists.txt
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pyx
  • cpp/libcudf_streaming/include/cudf_streaming/approx_distinct_count.hpp
  • python/cudf_streaming/cudf_streaming/approx_distinct_count.pxd
  • python/cudf_streaming/cudf_streaming/tests/test_approx_distinct_count.py
  • cpp/libcudf_streaming/src/approx_distinct_count.cpp

Comment thread python/cudf_polars/cudf_polars/streaming/actor_graph/utils.py
@wence-

wence- commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit bbeea4b into NVIDIA:main Aug 7, 2026
141 of 142 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python Aug 7, 2026
@wence-
wence- deleted the wence/fea/approx-distinct branch August 7, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake CMake build issue cudf-polars Issues specific to cudf-polars improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants