You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "quinnj (via GitHub)" <gi...@apache.org> on 2023/05/18 20:29:45 UTC

[GitHub] [arrow-julia] quinnj commented on a diff in pull request #419: fix `Vector{UInt8}` writing

quinnj commented on code in PR #419:
URL: https://github.com/apache/arrow-julia/pull/419#discussion_r1198274330


##########
src/eltypes.jl:
##########
@@ -393,23 +393,21 @@ end
 
 # arrowtype will call fieldoffset recursively for children
 function arrowtype(b, x::List{T, O, A}) where {T, O, A}
-    if eltype(A) == UInt8
-        if T <: AbstractString || T <: Union{AbstractString, Missing}
-            if O == Int32
-                Meta.utf8Start(b)
-                return Meta.Utf8, Meta.utf8End(b), nothing
-            else # if O == Int64
-                Meta.largUtf8Start(b)
-                return Meta.LargeUtf8, Meta.largUtf8End(b), nothing
-            end
-        else # if Vector{UInt8}
-            if O == Int32
-                Meta.binaryStart(b)
-                return Meta.Binary, Meta.binaryEnd(b), nothing
-            else # if O == Int64
-                Meta.largeBinaryStart(b)
-                return Meta.LargeBinary, Meta.largeBinaryEnd(b), nothing
-            end
+    if eltype(A) == UInt8 && T <: AbstractString || T <: Union{AbstractString, Missing}
+        if O == Int32
+            Meta.utf8Start(b)
+            return Meta.Utf8, Meta.utf8End(b), nothing
+        else # if O == Int64
+            Meta.largUtf8Start(b)
+            return Meta.LargeUtf8, Meta.largUtf8End(b), nothing
+        end
+    elseif eltype(A) == UInt8 && ArrowTypes.isstringtype(T)

Review Comment:
   What does "cathed" mean?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org