[ 
https://issues.apache.org/jira/browse/ARROW-2282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16388629#comment-16388629
 ] 

ASF GitHub Bot commented on ARROW-2282:
---------------------------------------

xhochy commented on a change in pull request #1720: ARROW-2282: [Python] Create 
StringArray from buffers
URL: https://github.com/apache/arrow/pull/1720#discussion_r172681819
 
 

 ##########
 File path: python/pyarrow/includes/libarrow.pxd
 ##########
 @@ -366,6 +366,12 @@ cdef extern from "arrow/api.h" namespace "arrow" nogil:
         const uint8_t* GetValue(int i, int32_t* length)
 
     cdef cppclass CStringArray" arrow::StringArray"(CBinaryArray):
+        CStringArray(int64_t length, shared_ptr[CBuffer] value_offsets,
+                     shared_ptr[CBuffer] data,
 
 Review comment:
   This is a stripped down-version without default arguments or const 
declarations as otherwise the compilation would fail with:
   
   ```
   
/home/uwe/Development/arrow-repos-3/arrow/python/build/temp.linux-x86_64-3.6/lib.cxx:
 In function ‘PyObject* __pyx_pf_7pyarrow_3lib_11StringArray_from_buffers(int, 
__pyx_obj_7pyarrow_3lib_Buffer*, __pyx_obj_7pyarrow_3lib_Buffer*, 
__pyx_obj_7pyarrow_3lib_Buffer*, int, int)’:
   
/home/uwe/Development/arrow-repos-3/arrow/python/build/temp.linux-x86_64-3.6/lib.cxx:42804:53:
 error: aggregate ‘__pyx_pf_7pyarrow_3lib_11StringArray_from_buffers(int, 
__pyx_obj_7pyarrow_3lib_Buffer*, __pyx_obj_7pyarrow_3lib_Buffer*, 
__pyx_obj_7pyarrow_3lib_Buffer*, int, 
int)::__pyx_opt_args_12CStringArray_CStringArray __pyx_t_5’ has incomplete type 
and cannot be defined
      struct __pyx_opt_args_12CStringArray_CStringArray __pyx_t_5;
   ``` 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [Python] Create StringArray from buffers
> ----------------------------------------
>
>                 Key: ARROW-2282
>                 URL: https://issues.apache.org/jira/browse/ARROW-2282
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Python
>            Reporter: Uwe L. Korn
>            Assignee: Uwe L. Korn
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.9.0
>
>
> While we will add a more general-purpose functionality in 
> https://issues.apache.org/jira/browse/ARROW-2281, the interface is more 
> complicate then the constructor that explicitly states all arguments:  
> {{StringArray(int64_t length, const std::shared_ptr<Buffer>& value_offsets, 
> …}}
> Thus I will also expose this explicit constructor.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to