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

[JS] Accept Iterables in IntVector/FloatVector from() signatures

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: JS-0.4.0
    • Fix Version/s: JS-0.4.1
    • Component/s: JavaScript
    • Labels:
      None

      Description

      Right now IntVector.from() and FloatVector.from() expect the data is already in typed-array form. But if we know the desired Vector type before hand (e.g. if Int32Vector.from() is called), we can accept any JS iterable of the values.

      In order to do this, we should ensure Float16Vector.from() properly clamps incoming f32/f64 values to u16s, in case the source is a vanilla 64-bit JS float.

        Attachments

          Activity

            People

            • Assignee:
              paul.e.taylor Paul Taylor
              Reporter:
              paul.e.taylor Paul Taylor
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: