From 1f5f7242564970183196a15798e87afbdd0938ff Mon Sep 17 00:00:00 2001 From: quinnj Date: Wed, 19 Sep 2018 07:51:27 -0600 Subject: [PATCH] Minor cleanup --- src/fallbacks.jl | 4 ++-- src/namedtuples.jl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fallbacks.jl b/src/fallbacks.jl index 92bab90..bdcbfa5 100644 --- a/src/fallbacks.jl +++ b/src/fallbacks.jl @@ -95,7 +95,7 @@ function buildcolumns(::Nothing, rowitr::T) where {T} state = iterate(rowitr) state === nothing && return NamedTuple() row, st = state - names = propertynames(row) + names = Tuple(propertynames(row)) L = Base.IteratorSize(T) len = haslength(L) ? length(rowitr) : 0 sch = Schema(names, nothing) @@ -112,7 +112,7 @@ function _buildcolumns(rowitr, row, st, sch, L, columns, rownbr, len, updated) row, st = state columns !== updated[] && return _buildcolumns(rowitr, row, st, sch, L, updated[], rownbr, len, updated) end - return columns + return updated[] end @inline function columns(x::T) where {T} diff --git a/src/namedtuples.jl b/src/namedtuples.jl index 099499e..b0e947f 100644 --- a/src/namedtuples.jl +++ b/src/namedtuples.jl @@ -88,7 +88,7 @@ function columntable(sch::Schema{names, types}, cols) where {names, types} end end # unknown schema case -columntable(::Nothing, cols) = NamedTuple{propertynames(cols)}(Tuple(getarray(col) for col in eachcolumn(cols))) +columntable(::Nothing, cols) = NamedTuple{Tuple(propertynames(cols))}(Tuple(getarray(col) for col in eachcolumn(cols))) function columntable(itr::T) where {T} istable(T) || throw(ArgumentError("NamedTuple of AbstractVectors requires a table input"))