Skip to content

Conversation

@universalmind303
Copy link
Member

Changes Made

Related Issues

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 28, 2026

Greptile Overview

Greptile Summary

This PR completes the migration of list kernels from arrow2 to arrow-rs APIs. The refactoring includes:

  • Removed the deprecated #![allow(deprecated, reason = "arrow2 migration")] attribute
  • Updated value_counts method to use Series::from_arrow with Arc<Field> instead of Series::try_from_field_and_arrow_array
  • Migrated iterator methods from as_arrow2().iter() to native into_iter() calls
  • Simplified join_list_of_utf8s helper function by removing unnecessary downcasting
  • Updated boolean array operations to use as_arrow()?.value(j) instead of as_arrow2().get_bit(j)
  • Modernized array construction patterns using .collect() and simplified builder patterns

All changes are consistent with the arrow2 to arrow-rs migration pattern seen in other parts of the codebase.

Confidence Score: 5/5

  • This PR is safe to merge with no risk - it's a straightforward API migration with consistent patterns
  • The refactoring follows established migration patterns, removes deprecated code properly, and maintains equivalent functionality with cleaner arrow-rs APIs. All conversions include proper error handling with ? operator.
  • No files require special attention

Important Files Changed

Filename Overview
src/daft-functions-list/src/kernels.rs Migrated list kernels from arrow2 to arrow-rs APIs, removing deprecated code and simplifying implementations

Sequence Diagram

sequenceDiagram
    participant Client
    participant ListArrayExtension
    participant Arrow2 API
    participant Arrow-rs API
    participant Series
    
    Note over ListArrayExtension,Arrow-rs API: Before Migration
    Client->>ListArrayExtension: Call list operation (e.g., value_counts, join)
    ListArrayExtension->>Arrow2 API: as_arrow2() / to_arrow2()
    Arrow2 API-->>ListArrayExtension: Arrow2 array
    ListArrayExtension->>Series: try_from_field_and_arrow_array()
    Series-->>Client: Result
    
    Note over ListArrayExtension,Arrow-rs API: After Migration
    Client->>ListArrayExtension: Call list operation (e.g., value_counts, join)
    ListArrayExtension->>Arrow-rs API: as_arrow()? / to_arrow()?
    Arrow-rs API-->>ListArrayExtension: Arrow-rs array
    ListArrayExtension->>Series: from_arrow(Arc<Field>, array)
    Series-->>Client: Result
    
    Note over ListArrayExtension: Deprecated allow attribute removed
    Note over ListArrayExtension: Iterator methods updated: into_iter()
    Note over ListArrayExtension: Simplified helper functions
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants