From 4197746c6b25322063056e2387339bbfbfad008c Mon Sep 17 00:00:00 2001 From: Eric Davies Date: Wed, 21 Feb 2018 12:07:40 -0600 Subject: [PATCH] Relax type assert because of https://github.com/JuliaLang/julia/issues/26135 --- src/datastreams.jl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/datastreams.jl b/src/datastreams.jl index a39fa6f2..5311ddd8 100644 --- a/src/datastreams.jl +++ b/src/datastreams.jl @@ -42,8 +42,8 @@ Data.accesspattern(jl_result::Result) = RandomAccess() # end # end -@inline _non_null_type(::Type{Union{T, Missing}}) where {T} = T -@inline _non_null_type(::Type{T}) where {T} = T +# @inline _non_null_type(::Type{Union{T, Missing}}) where {T} = T +# @inline _non_null_type(::Type{T}) where {T} = T # allow types that aren't just unions to handle nulls function Data.streamfrom( @@ -53,13 +53,11 @@ function Data.streamfrom( row::Int, col::Int, )::T where T>:Missing - NNT = _non_null_type(T) - if libpq_c.PQgetisnull(jl_result.result, row - 1, col - 1) == 1 return missing else oid = jl_result.column_oids[col] - return jl_result.column_funcs[col](PQValue{oid}(jl_result, row, col))::NNT + return jl_result.column_funcs[col](PQValue{oid}(jl_result, row, col)) # ::_non_null_type(T) except https://github.com/JuliaData/Missings.jl/issues/80 end end