diff --git a/src/TableTraits.jl b/src/TableTraits.jl index cff4ab1..86eb4dd 100644 --- a/src/TableTraits.jl +++ b/src/TableTraits.jl @@ -14,7 +14,9 @@ function isiterabletable(x::T) where {T} if Base.IteratorEltype(x)==Base.HasEltype() et = Base.eltype(x) - if et <: NamedTuple + if et === Union{} + return false + elseif et <: NamedTuple return true elseif et===Any return missing diff --git a/test/runtests.jl b/test/runtests.jl index 21324f7..1fc09ed 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -16,5 +16,6 @@ without_eltype = (i for i in table_array) @test !supports_get_columns_copy(table_array) @test !supports_get_columns_view(table_array) @test !supports_get_columns_copy_using_missing(table_array) +@test isiterabletable(Union{}[]) == false end