You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having a custom deserialization for one of the fields in the expected clickhouse::Row will swallow the returned rows if the deserialization is failing.
Steps to reproduce
Have a struct with a field that has custom serialization/deserialization
pub async fn get_by_id(
client: &clickhouse::Client,
id: &common_database::model::ch::event::Id,
) -> Result<Event, clickhouse::error::Error> {
client
.query("SELECT ?fields FROM event WHERE id = ?")
.bind(id)
.fetch_one::<Event>()
.await
}
Expected behaviour
In this case, the targeted event, has a NULL value for source_device_id => which will fall under the case of clickhouse::serde::uuid::option::deserialize(deserializer) or even clickhouse::serde::uuid::deserialize(deserializer) (same result), in this case the uuid::deserialize should return None, but it it throwing an Err(NotEnoughData). Not handling the error, will just swallow the returned row.
Describe the bug
Having a custom deserialization for one of the fields in the expected
clickhouse::Row
will swallow the returned rows if the deserialization is failing.Steps to reproduce
Expected behaviour
In this case, the targeted event, has a
NULL
value forsource_device_id
=> which will fall under the case ofclickhouse::serde::uuid::option::deserialize(deserializer)
or evenclickhouse::serde::uuid::deserialize(deserializer)
(same result), in this case the uuid::deserialize should returnNone
, but it it throwing anErr(NotEnoughData)
. Not handling the error, will just swallow the returned row.Code example
ChIdOption
deserialized with:The text was updated successfully, but these errors were encountered: