MCPcopy Create free account
hub / github.com/apache/datafusion / mul_checked

Method mul_checked

datafusion/common/src/scalar/mod.rs:2458–2461  ·  view source on GitHub ↗

Checked multiplication of `ScalarValue` NB: operating on `ScalarValue` directly is not efficient, performance sensitive code should operate on Arrays directly, using vectorized array kernels.

(&self, other: T)

Source from the content-addressed store, hash-verified

2456 /// NB: operating on `ScalarValue` directly is not efficient, performance sensitive code
2457 /// should operate on Arrays directly, using vectorized array kernels.
2458 pub fn mul_checked<T: Borrow<ScalarValue>>(&self, other: T) -> Result<ScalarValue> {
2459 let r = mul(&self.to_scalar()?, &other.borrow().to_scalar()?)?;
2460 Self::try_from_array(r.as_ref(), 0)
2461 }
2462
2463 /// Performs `lhs / rhs`
2464 ///

Callers 12

mul_boundsFunction · 0.80
varianceMethod · 0.80
combine_bernoullisFunction · 0.80
compute_meanFunction · 0.80
compute_varianceFunction · 0.80
round_decimalFunction · 0.80
round_decimalFunction · 0.80
pow_decimal_intFunction · 0.80
pow_decimal256_intFunction · 0.80
avgMethod · 0.80
multiplyMethod · 0.80
add_decimal_valuesMethod · 0.80

Calls 2

to_scalarMethod · 0.80
as_refMethod · 0.45

Tested by

no test coverage detected