Module numeric

Source
Expand description

Defines numeric arithmetic kernels on [PrimitiveArray], such as add

Macrosยง

date ๐Ÿ”’
neg_checked ๐Ÿ”’
neg_wrapping ๐Ÿ”’
op ๐Ÿ”’
Perform an infallible binary operation on potentially scalar inputs
op_ref ๐Ÿ”’
Same as op but with a type hint for the returned array
timestamp ๐Ÿ”’
try_op ๐Ÿ”’
Perform a fallible binary operation on potentially scalar inputs
try_op_ref ๐Ÿ”’
Same as try_op but with a type hint for the returned array

Enumsยง

Op ๐Ÿ”’
An enumeration of arithmetic operations

Traitsยง

DateOp ๐Ÿ”’
Arithmetic trait for date arrays
IntervalOp ๐Ÿ”’
Arithmetic trait for interval arrays
TimestampOp ๐Ÿ”’
Arithmetic trait for timestamp arrays

Functionsยง

add
Perform lhs + rhs, returning an error on overflow
add_wrapping
Perform lhs + rhs, wrapping on overflow for [DataType::is_integer]
arithmetic_op ๐Ÿ”’
Dispatch the given op to the appropriate specialized kernel
date_op ๐Ÿ”’
Perform arithmetic operation on a date array
decimal_op ๐Ÿ”’
Perform arithmetic operation on decimal arrays
div
Perform lhs / rhs
duration_op ๐Ÿ”’
float_op ๐Ÿ”’
Perform an arithmetic operation on floats
integer_op ๐Ÿ”’
Perform an arithmetic operation on integers
interval_op ๐Ÿ”’
Perform arithmetic operation on an interval array
mul
Perform lhs * rhs, returning an error on overflow
mul_wrapping
Perform lhs * rhs, wrapping on overflow for [DataType::is_integer]
neg
Negates each element of array, returning an error on overflow
neg_wrapping
Negates each element of array, wrapping on overflow for [DataType::is_integer]
rem
Perform lhs % rhs
sub
Perform lhs - rhs, returning an error on overflow
sub_wrapping
Perform lhs - rhs, wrapping on overflow for [DataType::is_integer]
timestamp_op ๐Ÿ”’
Perform arithmetic operation on a timestamp array