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/06/01 19:44:49 UTC

[GitHub] [arrow-julia] quinnj commented on a diff in pull request #446: Return SubArrays when possible for arrow list types

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


##########
src/append.jl:
##########
@@ -197,7 +197,13 @@ end
 function is_equivalent_schema(sch1::Tables.Schema, sch2::Tables.Schema)
     (sch1.names == sch2.names) || (return false)
     for (t1,t2) in zip(sch1.types, sch2.types)
-        (t1 === t2) || (return false)
+        tt1 = Base.nonmissingtype(t1)
+        tt2 = Base.nonmissingtype(t2)
+        if t1 == t2 || (tt1 <: AbstractVector && tt2 <: AbstractVector && eltype(tt1) == eltype(tt2))

Review Comment:
   This is needed to loosen what we consider "equivalent schemas"; i.e. a column w/ eltype `Vector{Int}` is now "equal" to `SubArray{Int, 1, ...}`



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