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

Function sub

arrow-arith/src/numeric.rs:44–46  ·  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

42
43/// Perform `lhs - rhs`, returning an error on overflow
44pub fn sub(lhs: &dyn Datum, rhs: &dyn Datum) -> Result<ArrayRef, ArrowError> {
45 arithmetic_op(Op::Sub, lhs, rhs)
46}
47
48/// Perform `lhs - rhs`, wrapping on overflow for [`DataType::is_integer`]
49pub fn sub_wrapping(lhs: &dyn Datum, rhs: &dyn Datum) -> Result<ArrayRef, ArrowError> {

Callers 10

add_benchmarkFunction · 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
test_dateFunction · 0.85

Calls 1

arithmetic_opFunction · 0.85

Tested by 9

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
test_dateFunction · 0.68