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


##########
swift/Arrow/Sources/Arrow/ArrowDecoder.swift:
##########
@@ -126,11 +136,19 @@ private struct ArrowUnkeyedDecoding: 
UnkeyedDecodingContainer {
 
     mutating func decodeNil() throws -> Bool {
         defer {increment()}
-        return try self.decoder.doDecode(self.currentIndex) == nil
+        return try self.decoder.isNull(self.currentIndex)
     }
 
     mutating func decode<T>(_ type: T.Type) throws -> T where T: Decodable {
-        if type == Int8.self || type == Int16.self ||
+        if type == Int8?.self || type == Int16?.self ||
+            type == Int32?.self || type == Int64?.self ||
+            type == UInt8?.self || type == UInt16?.self ||
+            type == UInt32?.self || type == UInt64?.self ||
+            type == String?.self || type == Double?.self ||
+            type == Float?.self || type == Date?.self {
+            defer {increment()}
+            return try self.decoder.doDecode(self.currentIndex)!
+        } else if type == Int8.self || type == Int16.self ||

Review Comment:
   They can be unified.  I had separated them to delineate the nullable and non 
nullable types but I can merge them.



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