Additional fixes for libcudf large strings support - #23612
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR updates JSON string-offset copying and field-name hashing to use ChangesOffset handling updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cpp/src/io/json/json_tree.cu (1)
577-581: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDeclare the return type of
d_equal.
d_equalis a generic device comparator used bycuco::static_set. Add-> boolto the lambda declaration.As per coding guidelines, extended device lambdas passed to device algorithms must declare explicit return types.
Proposed fix
- auto const d_equal = [char_ptr, offset_itr] __device__(auto node_id1, auto node_id2) { + auto const d_equal = + [char_ptr, offset_itr] __device__(auto node_id1, auto node_id2) -> bool {🤖 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/src/io/json/json_tree.cu` around lines 577 - 581, Update the d_equal device lambda declaration to explicitly specify a bool return type using trailing-return syntax, preserving its existing comparator logic and compatibility with cuco::static_set.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.
Nitpick comments:
In `@cpp/src/io/json/json_tree.cu`:
- Around line 577-581: Update the d_equal device lambda declaration to
explicitly specify a bool return type using trailing-return syntax, preserving
its existing comparator logic and compatibility with cuco::static_set.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 3a041847-a7ab-40e5-8790-421d72decebc
📒 Files selected for processing (4)
cpp/src/io/json/host_tree_algorithms.cucpp/src/io/json/json_tree.cucpp/src/strings/combine/join.cucpp/src/text/ngrams_tokenize.cu
Description
Fixes some code logic where strings offsets were hardcoded to expect int32 (or cudf::size_type).
These were found while investigating size_type/offset-type usage in libcudf.
Checklist