Skip to content

Commit

Permalink
Improve handling of vectors of vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
bkamins authored Apr 8, 2024
1 parent 175e431 commit 5f333f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fallbacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ end
WT = wrappedtype(eltype(rowitr))
if WT <: Tuple
return allocatecolumns(Schema((Symbol("Column$i") for i = 1:fieldcount(WT)), _fieldtypes(WT)), 0)
elseif isconcretetype(WT) && fieldcount(WT) > 0
# special case Vector from base and view of this vector as we are sure they do not store rows of a table
elseif isconcretetype(WT) && fieldcount(WT) > 0 && !(WT <: Union{Vector, SubArray{<:Vector}})
return allocatecolumns(Schema(fieldnames(WT), _fieldtypes(WT)), 0)
end
end
Expand Down

0 comments on commit 5f333f1

Please sign in to comment.