Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking changes in DataFrames master #67

Closed
amellnik opened this issue Oct 5, 2016 · 2 comments
Closed

Breaking changes in DataFrames master #67

amellnik opened this issue Oct 5, 2016 · 2 comments

Comments

@amellnik
Copy link
Contributor

amellnik commented Oct 5, 2016

As you probably know, there's lots of breaking changes in the DF master (see JuliaData/DataFrames.jl#1092). I'm opening this issue to track compatibility with MySQL master. There's tons of stuff that will need to change, but a typical use case is:

using DataFrames, MySQL #Both at master
conn = mysql_connect("my.server", "username", "pass", schema")
q = """
    Select * from Model_Data
    """
mysql_execute(conn, q)
LoadError: MethodError: no method matching mysql_interpret_field(::String, ::Type{Nullable{AbstractString}})
Closest candidates are:
  mysql_interpret_field(::AbstractString, !Matched::Type{UInt8}) at C:\Users\amellnik\.julia\v0.5\MySQL\src\results.jl:95
  mysql_interpret_field{T<:Number}(::AbstractString, !Matched::Type{T<:Number}) at C:\Users\amellnik\.julia\v0.5\MySQL\src\results.jl:97
  mysql_interpret_field{T<:AbstractString}(::AbstractString, !Matched::Type{T<:AbstractString}) at C:\Users\amellnik\.julia\v0.5\MySQL\src\results.jl:100
  ...
while loading In[4], in expression starting on line 4

 in populate_row!(::DataFrames.DataFrame, ::Int64, ::Ptr{Ptr{Int8}}, ::Int64) at C:\Users\amellnik\.julia\v0.5\MySQL\src\results.jl:244
 in mysql_result_to_dataframe(::MySQL.MySQLResult) at C:\Users\amellnik\.julia\v0.5\MySQL\src\results.jl:257
 in #mysql_execute#5(::Int64, ::Function, ::MySQL.MySQLHandle, ::String) at C:\Users\amellnik\.julia\v0.5\MySQL\src\handy.jl:160
 in mysql_execute(::MySQL.MySQLHandle, ::String) at C:\Users\amellnik\.julia\v0.5\MySQL\src\handy.jl:144
@nkottary
Copy link
Member

nkottary commented Oct 5, 2016

The type is wrapped in a Nullable. It needs to be extracted and the null case handled.

@amellnik
Copy link
Contributor Author

Closing -- DataFrames is sticking with the existing DataArrays API and will not be migrating to Nullables as per JuliaData/DataFrames.jl#1154.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants