-
Notifications
You must be signed in to change notification settings - Fork 82
Closed
Description
julia> SQLite.tables(db)
(name = Union{Missing, String}[],)
julia> SQLite.createtable!(db, "dialogs", Tables.Schema([:dialogID], [Int]))
101
julia> SQLite.tables(db)
ERROR: MethodError: promote_type(::Type{Union{}}, ::Type{String}) is ambiguous. Candidates:
promote_type(::Type{Union{}}, ::Type{T}) where T in Base at promotion.jl:224
promote_type(::Type{T}, ::Type{String}) where T<:WeakRefStrings.InlineString in WeakRefStrings at /home/suyao/.julia/packages/WeakRefStrings/a3jYm/src/inlinestrings.jl:44
Possible fix, define
promote_type(::Type{Union{}}, ::Type{String})
Stacktrace:
[1] add_or_widen!(val::String, col::Int64, nm::Symbol, dest::Tables.EmptyVector, row::Int64, updated::Base.RefValue{Any}, L::Base.SizeUnknown)
@ Tables ~/.julia/packages/Tables/E99hk/src/fallbacks.jl:150
[2] eachcolumns
@ ~/.julia/packages/Tables/E99hk/src/utils.jl:127 [inlined]
[3] _buildcolumns(rowitr::SQLite.Query, row::SQLite.Row, st::Nothing, sch::Tables.Schema{(:name,), nothing}, columns::Tuple{Tables.EmptyVector}, updated::Base.RefValue{Any})
@ Tables ~/.julia/packages/Tables/E99hk/src/fallbacks.jl:187
[4] buildcolumns
@ ~/.julia/packages/Tables/E99hk/src/fallbacks.jl:217 [inlined]
[5] columns
@ ~/.julia/packages/Tables/E99hk/src/fallbacks.jl:253 [inlined]
[6] columntable(itr::SQLite.Query)
@ Tables ~/.julia/packages/Tables/E99hk/src/namedtuples.jl:171
[7] execute(f::typeof(Tables.columntable), stmt::SQLite.Stmt, params::NamedTuple{(), Tuple{}})
@ DBInterface ~/.julia/packages/DBInterface/qcAwq/src/DBInterface.jl:127
[8] execute(f::Function, conn::SQLite.DB, sql::String, params::NamedTuple{(), Tuple{}})
@ DBInterface ~/.julia/packages/DBInterface/qcAwq/src/DBInterface.jl:136
[9] #execute#3
@ ~/.julia/packages/DBInterface/qcAwq/src/DBInterface.jl:145 [inlined]
[10] execute
@ ~/.julia/packages/DBInterface/qcAwq/src/DBInterface.jl:145 [inlined]
[11] tables (repeats 2 times)
@ ~/.julia/packages/SQLite/P2GU2/src/SQLite.jl:660 [inlined]
[12] top-level scope
@ REPL[7]:1Or I create the table by SQL statement, the same problem occurs.
zhaoyachuanl
Metadata
Metadata
Assignees
Labels
No labels