jding-xyz commented on code in PR #152:
URL: https://github.com/apache/arrow-swift/pull/152#discussion_r3007624862


##########
Sources/Arrow/ArrowData.swift:
##########
@@ -26,9 +26,26 @@ public class ArrowData {
     public let stride: Int
 
     convenience init(_ arrowType: ArrowType, buffers: [ArrowBuffer], 
nullCount: UInt) throws {
+        let arrayLength: UInt
+        switch arrowType.info {
+        case .variableInfo:
+            guard buffers.count >= 2 else {
+                throw ArrowError.invalid(
+                    "Variable-width ArrowData requires at least two buffers 
(null bitmap and offsets).")

Review Comment:
   Good catch. Modified as suggested. 



-- 
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