ClickHouse/clickhouse-rs

Help: Float not working when fetch_all

Closed this issue · 2 comments

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"] }

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 commented

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