abandy commented on code in PR #34842:
URL: https://github.com/apache/arrow/pull/34842#discussion_r1157130160


##########
swift/Arrow/Sources/Arrow/ChunkedArray.swift:
##########
@@ -42,8 +45,32 @@ public class ChunkedArray<T> {
         self.nullCount = nullCount
     }
     
-    subscript(_ index: UInt) -> ArrowArray<T> {
-        return arrays[Int(index)]
+    public subscript(_ index: UInt) -> T? {
+        if arrays.count == 0 {
+            return nil
+        }
+        
+        var localIndex = index
+        var arrayIndex = 0;
+        var len: UInt = arrays[arrayIndex].length
+        while(localIndex > len) {

Review Comment:
   Good catch! I will remove the parenthesis.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to