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

Order of columns returned alphabetically, which does not match query SELECT order #37

Closed
drizk1 opened this issue Apr 3, 2024 · 1 comment

Comments

@drizk1
Copy link
Contributor

drizk1 commented Apr 3, 2024

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 drizk1 changed the title Order of columns in Df does not match query Order of columns in returned df does not match query order Apr 3, 2024
@drizk1 drizk1 changed the title Order of columns in returned df does not match query order Order of columns returned alphabetically, which does not match query SELECT order Apr 3, 2024
@drizk1
Copy link
Contributor Author

drizk1 commented Apr 4, 2024

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.

@drizk1 drizk1 closed this as completed Aug 4, 2024
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

1 participant