Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-11546

[Rust][Experiment][WIP] Experiment with a TypedArray trait

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • None
    • Rust

    Description

      A few of the arrow kernels rely on macros to iterate over values using a common ".value()" function, but:

      • this is unsafe on some array types (string, binary), but unsafe on other array types (primitive)
      • this forces iteration by index, which does not always optimize away bounds-checking (at least in the binary case)

      This PR is an experiment with a TypedArray trait, which provides access to array values (along with associated types describing those values).  This will NOT remove the need for downcasting, as the associated types aren't object-safe.  But it should be sufficient to allow simple processing of values from multiple array types using a generic function instead of a macro.

      Attachments

        Issue Links

          Activity

            People

              tyrelr Tyrel Rink
              tyrelr Tyrel Rink
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3.5h
                  3.5h