From 32db3dd1dfd30df476ee00e33ee439d59f4daf8d Mon Sep 17 00:00:00 2001 From: abandy Date: Mon, 10 Jun 2024 16:14:30 -0400 Subject: [PATCH] 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 Signed-off-by: Sutou Kouhei --- swift/Arrow/Sources/Arrow/ArrowDecoder.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/swift/Arrow/Sources/Arrow/ArrowDecoder.swift b/swift/Arrow/Sources/Arrow/ArrowDecoder.swift index 9aa8a65137d28..518b4e9c32970 100644 --- a/swift/Arrow/Sources/Arrow/ArrowDecoder.swift +++ b/swift/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")