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

Help: Float not working when fetch_all #31

Closed
selvavm opened this issue Dec 23, 2021 · 2 comments
Closed

Help: Float not working when fetch_all #31

selvavm opened this issue Dec 23, 2021 · 2 comments

Comments

@selvavm
Copy link

selvavm commented Dec 23, 2021

Hi @loyd

You have closed the issue but still it is not working. I am getting below error
the trait bound f64: clickhouse::row::Primitive is not satisfied
required because of the requirements on the impl of Row for f64

Below is my code

let r_ts = ts_client
      .query(&query)
      .fetch_all::<f64>()
      .await.unwrap();

Below is my dependencies,

[dependencies]
clickhouse = "0.9.3"
tokio = { version = "1.15.0", features = ["full"] }
@selvavm
Copy link
Author

selvavm commented Dec 23, 2021

Hi @loyd

I find that if I use a Struct with Row implementation and has a field with f32 it is working. Not sure why direct f32 is not working.

Thanks,

@loyd
Copy link
Owner

loyd commented Jan 17, 2022

It was a bug in the macro that implements Primitive for types. f64 was the last one on that list. Fixed in 30882a3

@loyd loyd closed this as completed Jan 17, 2022
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