theirix commented on code in PR #16831:
URL: https://github.com/apache/datafusion/pull/16831#discussion_r2223620746


##########
datafusion/common/src/scalar/mod.rs:
##########
@@ -1382,6 +1382,12 @@ impl ScalarValue {
             DataType::Float16 => 
ScalarValue::Float16(Some(f16::from_f32(1.0))),
             DataType::Float32 => ScalarValue::Float32(Some(1.0)),
             DataType::Float64 => ScalarValue::Float64(Some(1.0)),
+            DataType::Decimal128(precision, scale) => {
+                ScalarValue::Decimal128(Some(1), *precision, *scale)

Review Comment:
   Added support for scale, input verification and some tests. It should match 
Arrow's [decimal 
semantics](https://docs.rs/arrow/latest/arrow/datatypes/enum.DataType.html#variant.Decimal128)
 now.



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to