This is an automated email from the ASF dual-hosted git repository.

raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-swift.git

commit 41fad49c2d213b5ee177038bef19243a851bf99b
Author: abandy <[email protected]>
AuthorDate: Mon Jun 10 16:14:30 2024 -0400

    MINOR: [Swift] Add missing Bool type to decoder type checks (#42064)
    
    ### What changes are included in this PR?
    
    Adding Bool and Bool? as valid types for decoding.
    
    Authored-by: Alva Bandy <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 Arrow/Sources/Arrow/ArrowDecoder.swift | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Arrow/Sources/Arrow/ArrowDecoder.swift 
b/Arrow/Sources/Arrow/ArrowDecoder.swift
index 9aa8a65..518b4e9 100644
--- a/Arrow/Sources/Arrow/ArrowDecoder.swift
+++ b/Arrow/Sources/Arrow/ArrowDecoder.swift
@@ -146,6 +146,7 @@ private struct ArrowUnkeyedDecoding: 
UnkeyedDecodingContainer {
             type == UInt32?.self || type == UInt64?.self ||
             type == String?.self || type == Double?.self ||
             type == Float?.self || type == Date?.self ||
+            type == Bool?.self || type == Bool.self ||
             type == Int8.self || type == Int16.self ||
             type == Int32.self || type == Int64.self ||
             type == UInt8.self || type == UInt16.self ||
@@ -359,7 +360,8 @@ private struct ArrowSingleValueDecoding: 
SingleValueDecodingContainer {
             type == UInt8.self || type == UInt16.self ||
             type == UInt32.self || type == UInt64.self ||
             type == String.self || type == Double.self ||
-            type == Float.self || type == Date.self {
+            type == Float.self || type == Date.self ||
+            type == Bool.self {
             return try self.decoder.doDecode(0)!
         } else {
             throw ArrowError.invalid("Type \(type) is currently not supported")

Reply via email to