Skip to content

Fix explain() failing on UnaryFunction with multiple children - #23050

Merged
rapids-bot[bot] merged 4 commits into
NVIDIA:mainfrom
Matt711:bug/polars/explain-unary-func
Jul 1, 2026
Merged

Fix explain() failing on UnaryFunction with multiple children#23050
rapids-bot[bot] merged 4 commits into
NVIDIA:mainfrom
Matt711:bug/polars/explain-unary-func

Conversation

@Matt711

@Matt711 Matt711 commented Jun 30, 2026

Copy link
Copy Markdown
Member

Description

Oversight by me in #22984

Checklist

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

@Matt711
Matt711 requested a review from a team as a code owner June 30, 2026 20:53
@Matt711
Matt711 requested a review from vyasr June 30, 2026 20:53
@Matt711 Matt711 added bug Something isn't working non-breaking Non-breaking change labels Jun 30, 2026
@github-actions github-actions Bot added Python Affects Python cuDF API. cudf-polars Issues specific to cudf-polars labels Jun 30, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Jun 30, 2026
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review 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: 3c09c4c0-39a3-462a-bf08-13fb68f5a9d2

📥 Commits

Reviewing files that changed from the base of the PR and between bf1cad5 and fa82e20.

📒 Files selected for processing (1)
  • python/cudf_polars/cudf_polars/streaming/explain.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • python/cudf_polars/cudf_polars/streaming/explain.py

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved how unary expressions are displayed in streaming explanations, so functions with multiple inputs now appear in a clearer, standard format like name(arg1, arg2, ...).

Walkthrough

Modified _predicate_to_str in cudf_polars streaming explain output to format UnaryFunction expressions from all child arguments as a comma-separated call string.

Changes

Predicate String Formatting

Layer / File(s) Summary
Multi-argument UnaryFunction rendering
python/cudf_polars/cudf_polars/streaming/explain.py
_predicate_to_str's UnaryFunction case now builds name(arg1, arg2, ...) from all expr.children instead of formatting only a single child argument.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • rapidsai/cudf#22984: Modifies the same _predicate_to_str function in explain.py, extending predicate-to-string conversion logic used in plan node rendering.

Suggested reviewers

  • vyasr
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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 and concisely describes the main bug fix in the changeset.
Description check ✅ Passed The description is related to the change and correctly references the fix and prior oversight.
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.

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

Can you explain the motivation for this fix, like a CI failure? I'm interested to know what UnaryFunction consumes multiple children.

Comment thread python/cudf_polars/cudf_polars/streaming/explain.py
@Matt711

Matt711 commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

/merge

@rapids-bot
rapids-bot Bot merged commit a1f4195 into NVIDIA:main Jul 1, 2026
108 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cudf-polars Issues specific to cudf-polars non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants