Skip to content

Ensure ColumnBase.create asserts that plc_column type is equivalent to passed dtype#21325

Merged
rapids-bot[bot] merged 6 commits intorapidsai:mainfrom
mroeschke:ref/cudf/validate_column_construction
Feb 6, 2026
Merged

Ensure ColumnBase.create asserts that plc_column type is equivalent to passed dtype#21325
rapids-bot[bot] merged 6 commits intorapidsai:mainfrom
mroeschke:ref/cudf/validate_column_construction

Conversation

@mroeschke
Copy link
Contributor

Description

Currently, we have ColumnBase subclasses that can represent multiple types e.g. NumericalColumn. ColumnBase._validate_args validates that the passed dtype is a valid type for this column but currently we lack a check that the passed dtype is an equivalent type to the passed plc_column.type(). #21320 is an example where we can end up in an invalid state if these mismatch.

A follow up is to fortify this check for nested types to also validate the child types.

On top of #21324

Checklist

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

@mroeschke mroeschke self-assigned this Feb 4, 2026
@mroeschke mroeschke requested a review from a team as a code owner February 4, 2026 03:07
@mroeschke mroeschke added the Python Affects Python cuDF API. label Feb 4, 2026
@mroeschke mroeschke added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Feb 4, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Feb 4, 2026
@vyasr
Copy link
Contributor

vyasr commented Feb 6, 2026

/merge

@rapids-bot rapids-bot bot merged commit 7116d50 into rapidsai:main Feb 6, 2026
108 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in cuDF Python Feb 6, 2026
@mroeschke mroeschke deleted the ref/cudf/validate_column_construction branch February 6, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants