Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix fallback case on empty input iterators with abstract eltypes (#229)
Fixes #228. We recently added support so that when a schema-less input row table was being converted to column-orientation, but had an eltype, we produced an appropriately typed NamedTuple with empty Vectors of corresponding types. The issue reported, however, is when an empty input has an eltype, but that eltype is abstract. The error results by trying to call `fieldcount(::AbstractType)`, which fails and doesn't make sense to do anyway. This is technically a regression because we used to produce an empty `NamedTuple()` unconditionally, and now we're producing this error path for the abstract eltype case. The fix proposed is straightforward: only consider generating a typed NamedTuple output if the iterator eltype is concretely typed.
- Loading branch information