Order of columns returned alphabetically, which does not match query SELECT order
Closed this issue · 1 comments
drizk1 commented
Howdy, I was trying out Clickhouse before potentially adding it as a backend for a tidierdb.jl, and I noticed that the order of columns in the df does not match the select statement. Is this something specifc to clickhouse // is there a way around this? It returns the alphabetically..
Thank you
query = """
SELECT model, hp, mpg FROM mtcars2
"""
select_df(conn,query)
32×3 DataFrame
Row │ hp model mpg
│ Int32 String Float64
─────┼────────────────────────────────────
1 │ 150 AMC Javelin 15.2
2 │ 205 Cadillac Fleetwood 10.4
3 │ 245 Camaro Z28 13.3
4 │ 230 Chrysler Imperial 14.7
5 │ 93 Datsun 710 22.8
⋮ │ ⋮ ⋮ ⋮
28 │ 91 Porsche 914-2 26.0
29 │ 65 Toyota Corolla 33.9
30 │ 97 Toyota Corona 21.5
31 │ 105 Valiant 18.1
32 │ 109 Volvo 142E 21.4
drizk1 commented
I figured out a way around this for TidierDB.jl, so I've added it as a backend and it's great thx.
I'll leave this open and it's up to you all if u want to close it or not. I'm fine either way.