Handle int64 strings offsets in cudf::byte_cast API - #23725
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
@coderabbitai full review |
|
/ok to test |
✅ Action performedFull review finished. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughThe string byte-casting path enforces ChangesString byte-casting
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized fix changes int64 offset handling in the byte-cast path; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| detail::copy_bitmask(input, stream, mr)); | ||
| auto offsets_col = std::move(col_content.children[strings_column_view::offsets_column_index]); | ||
| if (offsets_col->type().id() != type_id::INT32) { | ||
| offsets_col = cudf::detail::cast(offsets_col->view(), data_type{type_id::INT32}, stream, mr); |
There was a problem hiding this comment.
question: What happens if the string offsets are too large to cast into INT32?
There was a problem hiding this comment.
I believe the check on line 125 ensures all the offsets values are less than max(int32).
Probably should change max(size_type) to max(int32) there until large lists are supported.
wence-
left a comment
There was a problem hiding this comment.
I can see that this is the right thing for int64 string offsets if all of those fit in int32, but what if they don't?
wence-
left a comment
There was a problem hiding this comment.
Optional: change overflow check on line 125 to std::numeric_limits<int32_t>::max()
|
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. |
|
/merge |
Description
Fixes logic in the
cudf::byte_castAPI which converts a strings column into a list column and properly handlesint64offsets by casting them to INT32 if possible.Reference #23685 (review)
Checklist