Skip to content

decimal numbers are not handled properly #63

@clarkevans

Description

@clarkevans
julia> @query select(number => 3.5)
1×1 DataFrame
 Row │ number 
     │ Dec64  
─────┼────────
   1 │    3.0

and

julia> @query select(number => 0.5)
ERROR: ArgumentError: invalid number format 
Stacktrace:
  [1] parse(::Type{DecFP.Dec64}, s::SubString{String})
    @ DecFP ~/.julia/packages/DecFP/Cud5F/src/DecFP.jl:323
  [2] jlcast
    @ ~/.julia/packages/ODBC/Yzo3t/src/utils.jl:341 [inlined]
  [3] getcolumn(x::ODBC.Row, ::Type{Union{Missing, DecFP.Dec64}}, i::Int64, nm::Symbol)
    @ ODBC ~/.julia/packages/ODBC/Yzo3t/src/dbinterface.jl:373
  [4] eachcolumns
    @ ~/.julia/packages/Tables/NSGZI/src/utils.jl:111 [inlined]
  [5] buildcolumns(schema::Tables.Schema{(:number,), Tuple{Union{Missing, DecFP.Dec64}}}, rowitr::ODBC.Cursor{false, false})
    @ Tables ~/.julia/packages/Tables/NSGZI/src/fallbacks.jl:147
  [6] _columns
    @ ~/.julia/packages/Tables/NSGZI/src/fallbacks.jl:265 [inlined]
  [7] columns
    @ ~/.julia/packages/Tables/NSGZI/src/fallbacks.jl:258 [inlined]
  [8] DataFrame(x::ODBC.Cursor{false, false}; copycols::Nothing)
    @ DataFrames ~/.julia/packages/DataFrames/58MUJ/src/other/tables.jl:57
  [9] DataFrame
    @ ~/.julia/packages/DataFrames/58MUJ/src/other/tables.jl:48 [inlined]
 [10] cursor_to_dataframe(db::FunSQL.SQLConnection{ODBC.Connection}, cr::ODBC.Cursor{false, false}; annotate_keys::Bool)
    @ TRDW ~/TRDW.jl/src/general.jl:110
 [11] run(db::FunSQL.SQLConnection{ODBC.Connection}, q::FunSQL.SQLNode; annotate_keys::Bool)
    @ TRDW ~/TRDW.jl/src/general.jl:262
 [12] top-level scope
    @ REPL[3]:1

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions