Skip to content

Remove deprecated API cudf::nans_to_nulls - #24201

Open
davidwendt wants to merge 1 commit into
NVIDIA:mainfrom
davidwendt:nans-to-nulls-dep
Open

davidwendt wants to merge 1 commit into
NVIDIA:mainfrom
davidwendt:nans-to-nulls-dep

Conversation

@davidwendt

Copy link
Copy Markdown
Contributor

Description

Removes the deprecated function cudf::nans_to_nulls which is replaced by cudf::column_nans_to_nulls.

Checklist

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

@davidwendt davidwendt self-assigned this Sep 16, 2026
@davidwendt
davidwendt requested review from a team as code owners September 16, 2026 17:55
@davidwendt davidwendt added the 3 - Ready for Review Ready for review by team label Sep 16, 2026
@davidwendt davidwendt added improvement Improvement / enhancement to an existing function breaking Breaking change labels Sep 16, 2026
@github-actions github-actions Bot added libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API. cudf-polars Issues specific to cudf-polars pylibcudf Issues specific to the pylibcudf package labels Sep 16, 2026

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

`

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e000aa29-ac4b-401d-a981-5ce40fa2d0f4

📥 Commits

Reviewing files that changed from the base of the PR and between 450b24a and ce62970.

📒 Files selected for processing (8)
  • cpp/include/cudf/transform.hpp
  • cpp/src/transform/nans_to_nulls.cu
  • python/cudf_polars/cudf_polars/containers/column.py
  • python/pylibcudf/pylibcudf/libcudf/transform.pxd
  • python/pylibcudf/pylibcudf/transform.pxd
  • python/pylibcudf/pylibcudf/transform.pyi
  • python/pylibcudf/pylibcudf/transform.pyx
  • python/pylibcudf/tests/test_transform.py
💤 Files with no reviewable changes (6)
  • python/pylibcudf/pylibcudf/transform.pyi
  • python/pylibcudf/pylibcudf/transform.pxd
  • python/pylibcudf/pylibcudf/transform.pyx
  • cpp/include/cudf/transform.hpp
  • python/pylibcudf/pylibcudf/libcudf/transform.pxd
  • cpp/src/transform/nans_to_nulls.cu

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Summary

Summary by CodeRabbit

  • New Features

    • Added a column-based NaN-to-null conversion interface that returns a complete column.
    • NaN values are converted to null while existing null values are preserved.
    • Empty inputs remain supported, and non-floating-point inputs are rejected.
  • Breaking Changes

    • Removed the previous NaN-to-null interface that returned a null mask and null count.
    • Updated Python column masking to use the column-based conversion behavior.

Walkthrough

The NaN-to-null conversion surface now uses a column-returning API. C++ declarations, Python bindings, and Polars integration no longer use the removed mask-and-count API.

Changes

NaN-to-null conversion migration

Layer / File(s) Summary
C++ column conversion API
cpp/include/cudf/transform.hpp, cpp/src/transform/nans_to_nulls.cu
Replaces nans_to_nulls with column_nans_to_nulls, which returns a column with NaNs converted to nulls and existing nulls preserved.
Python binding API cleanup
python/pylibcudf/pylibcudf/libcudf/transform.pxd, python/pylibcudf/pylibcudf/transform.*
Removes the obsolete nans_to_nulls declarations, wrapper, and export.
Polars integration and test cleanup
python/cudf_polars/cudf_polars/containers/column.py, python/pylibcudf/tests/test_transform.py
Updates Column.mask_nans to use column_nans_to_nulls. Removes the obsolete test and updates the copyright notice.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to ce629

The API migration updates the shown consumer to the replacement column-returning interface, with no actionable current-head risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. 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 and concisely states that the deprecated cudf::nans_to_nulls API is removed. It matches the main change.
Description check ✅ Passed The description accurately explains that cudf::nans_to_nulls is removed and replaced by cudf::column_nans_to_nulls. It is related to 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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Ready for Review Ready for review by team breaking Breaking change cudf-polars Issues specific to cudf-polars improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. pylibcudf Issues specific to the pylibcudf package Python Affects Python cuDF API.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants