Skip to content

Commit

Permalink
add f64 conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
PSeitz committed Aug 30, 2024
1 parent 8454c98 commit 31e5cd3
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,10 @@ impl LeafType {
let val = u64::from_json_to_self(&json_val, numeric_options.coerce)?;
Ok(OneOrIter::one((val).into()))
}
LeafType::F64(_) => Err("unsupported concat type: f64".to_string()),
LeafType::F64(numeric_options) => {
let val = f64::from_json_to_self(&json_val, numeric_options.coerce)?;
Ok(OneOrIter::one((val).into()))
}
LeafType::Bool(_) => {
if let JsonValue::Bool(val) = json_val {
Ok(OneOrIter::one((val).into()))
Expand All @@ -294,9 +297,7 @@ impl LeafType {
LeafType::DateTime(_date_time_options) => {
Err("unsupported concat type: DateTime".to_string())
}
LeafType::Bytes(_binary_options) => {
Err("unsupported concat type: DateTime".to_string())
}
LeafType::Bytes(_binary_options) => Err("unsupported concat type: Bytes".to_string()),
LeafType::Json(_) => {
if let JsonValue::Object(json_obj) = json_val {
Ok(OneOrIter::Iter(
Expand Down

0 comments on commit 31e5cd3

Please sign in to comment.