scovich commented on code in PR #9689:
URL: https://github.com/apache/arrow-rs/pull/9689#discussion_r3073255006
##########
parquet-variant-compute/src/type_conversion.rs:
##########
@@ -246,6 +254,18 @@ where
precision,
scale,
),
+ Variant::Float(f) => single_float_to_decimal::<O>(f64::from(*f), mul),
+ Variant::Double(f) => single_float_to_decimal::<O>(*f, mul),
+ Variant::String(v) if scale > 0 => parse_string_to_decimal_native::<O>(
Review Comment:
Oh... but this code is converting _from_ variant to _arrow_ decimal, so
negative scales are totally legit.
Meanwhile, perhaps a code comment would be good here? It might not be
obvious to future source divers _why_ the `scale > 0` constraint.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]