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
- Interval
Op ๐ - Arithmetic trait for interval arrays
- Timestamp
Op ๐ - 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