Skip to content

Commit

Permalink
Update mod.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
berkaysynnada committed Dec 18, 2024
1 parent 56d0c2b commit c5a05d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions datafusion/common/src/scalar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,12 @@ impl ScalarValue {
}
DataType::Date32 => ScalarValue::Date32(Some(0)),
DataType::Date64 => ScalarValue::Date64(Some(0)),
DataType::Decimal128(precision, scale) => {
ScalarValue::Decimal128(Some(0), *precision, *scale)
}
DataType::Decimal256(precision, scale) => {
ScalarValue::Decimal256(Some(i256::ZERO), *precision, *scale)
}
_ => {
return _not_impl_err!(
"Can't create a zero scalar from data_type \"{datatype:?}\""
Expand Down

0 comments on commit c5a05d5

Please sign in to comment.