diff --git a/src/fallbacks.jl b/src/fallbacks.jl index 5256c56..48c2ab1 100644 --- a/src/fallbacks.jl +++ b/src/fallbacks.jl @@ -203,7 +203,7 @@ end WT = wrappedtype(eltype(rowitr)) if WT <: Tuple return allocatecolumns(Schema((Symbol("Column$i") for i = 1:fieldcount(WT)), _fieldtypes(WT)), 0) - elseif fieldcount(WT) > 0 + elseif isconcretetype(WT) && fieldcount(WT) > 0 return allocatecolumns(Schema(fieldnames(WT), _fieldtypes(WT)), 0) end end diff --git a/test/runtests.jl b/test/runtests.jl index adfcac1..d57c6f0 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -169,6 +169,9 @@ end @test eltype(rt).parameters[1] == nms @test Tables.columntable(rt) == nt @test Tables.buildcolumns(nothing, rt) == nt + + # 228 + @test Tables.columntable(NamedTuple[]) === NamedTuple() end @testset "Materializer" begin