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

[Python] Correct issues in numpy_to_arrow conversion routines

    Details

      Description

      Following the discussion at https://github.com/apache/arrow/pull/1689, there are a few issues with conversion of various types to arrow that are incorrect or could be improved:

      • PyBytes_GET_SIZE is being casted to the wrong type, for example
        const int32_t length = static_cast<int32_t>(PyBytes_GET_SIZE(obj));
      • Handle the possibility with the statement
        builder->value_data_length() + length > kBinaryMemoryLimit
        if length is larger than kBinaryMemoryLimit
      • Look into using common code for binary object conversion to avoid duplication, and allow support for bytes and bytearray objects in other places than numpy_to_arrow. (possibly put in src/arrow/python/helpers.h)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pitrou Antoine Pitrou
                Reporter:
                bryanc Bryan Cutler
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: