MCPcopy Create free account
hub / github.com/apache/arrow-rs / add

Function add

arrow-arith/src/numeric.rs:34–36  ·  view source on GitHub ↗

Perform `lhs + rhs`, returning an error on overflow

(lhs: &dyn Datum, rhs: &dyn Datum)

Source from the content-addressed store, hash-verified

32
33/// Perform `lhs + rhs`, returning an error on overflow
34pub fn add(lhs: &dyn Datum, rhs: &dyn Datum) -> Result<ArrayRef, ArrowError> {
35 arithmetic_op(Op::Add, lhs, rhs)
36}
37
38/// Perform `lhs + rhs`, wrapping on overflow for [`DataType::is_integer`]
39pub fn add_wrapping(lhs: &dyn Datum, rhs: &dyn Datum) -> Result<ArrayRef, ArrowError> {

Callers 10

add_benchmarkFunction · 0.85
doubleFunction · 0.85
test_integerFunction · 0.85
test_floatFunction · 0.85
test_decimalFunction · 0.85
test_timestamp_implFunction · 0.85
test_intervalFunction · 0.85
test_duration_implFunction · 0.85
test_date_implFunction · 0.85

Calls 1

arithmetic_opFunction · 0.85

Tested by 8

test_integerFunction · 0.68
test_floatFunction · 0.68
test_decimalFunction · 0.68
test_timestamp_implFunction · 0.68
test_intervalFunction · 0.68
test_duration_implFunction · 0.68
test_date_implFunction · 0.68