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

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

xhochy commented on a change in pull request #1702: ARROW-2262: [Python] 
Support slicing on pyarrow.ChunkedArray
URL: https://github.com/apache/arrow/pull/1702#discussion_r172953568
 
 

 ##########
 File path: python/pyarrow/table.pxi
 ##########
 @@ -77,6 +77,49 @@ cdef class ChunkedArray:
         self._check_nullptr()
         return self.chunked_array.null_count()
 
+    def __getitem__(self, key):
+        cdef int64_t item, i
+        self._check_nullptr()
+        if isinstance(key, slice):
+            return _normalize_slice(self, key)
+        else:
+            item = int(key)
+            if item >= self.chunked_array.length() or item < 0:
+                return IndexError("ChunkedArray selection out of bounds")
+            for i in range(self.num_chunks):
 
 Review comment:
   Yes they would benefit from this API but it is much more complicated to 
implement there as `arrow::ChunkedArray` has no type.

----------------------------------------------------------------
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] Support slicing on pyarrow.ChunkedArray
> ------------------------------------------------
>
>                 Key: ARROW-2262
>                 URL: https://issues.apache.org/jira/browse/ARROW-2262
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: Python
>            Reporter: Uwe L. Korn
>            Assignee: Uwe L. Korn
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.9.0
>
>




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

Reply via email to