SQLite: query with duplicate column names |> DataFrame

Thank you @quinnj! That would work, however, I found this workaround for SQLite and works just fine with DataFrames.jl (@bkamins), perhaps would be best to keep the default SQLite behavior.

julia> t = Q("select * from (select * from a join b on a.x1 > b.x2)") |> DataFrame
56×5 DataFrame
 Row │ x1         x2        x3         x1:1       x2:1      
     │ Float64    Float64   Float64    Float64    Float64   
─────┼──────────────────────────────────────────────────────
   1 │ 0.569232   0.677381  0.637279   0.145199   0.345888
   2 │ 0.569232   0.677381  0.637279   0.507727   0.217739
   [...]

I understand the reasons not to allow makeunique in Tables.jl, would it be possible though to allow the renaming of columns for a SQLite.Query or in general any type implementing Tables interface?

julia> t.names = [:a,:b,:c,:d,:e]
ERROR: setfield! immutable struct of type Query cannot be changed
1 Like