Module arrow2::compute::arithmetics

source ·
Available on crate feature compute_arithmetics only.
Expand description

Defines basic arithmetic kernels for PrimitiveArrays.

The Arithmetics module is composed by basic arithmetics operations that can be performed on PrimitiveArray.

Whenever possible, each operation declares variations of the basic operation that offers different guarantees:

  • plain: panics on overflowing and underflowing.
  • checked: turns an overflowing to a null.
  • saturating: turns the overflowing to the MAX or MIN value respectively.
  • overflowing: returns an extra Bitmap denoting whether the operation overflowed.
  • adaptive: for Decimal only, adjusts the precision and scale to make the resulting value fit.

Modules

  • Contains arithemtic functions for PrimitiveArrays.
  • Defines the arithmetic kernels for Decimal PrimitiveArrays. The Decimal type specifies the precision and scale parameters. These affect the arithmetic operations and need to be considered while doing operations with Decimal numbers.
  • Defines the arithmetic kernels for adding a Duration to a Timestamp, Time32, Time64, Date32 and Date64.

Traits

  • Defines basic addition operation for primitive arrays
  • Defines checked addition operation for primitive arrays
  • Defines checked division operation for primitive arrays
  • Defines checked multiplication operation for primitive arrays
  • Defines checked reminder operation for primitive arrays
  • Defines checked subtraction operation for primitive arrays
  • Defines basic division operation for primitive arrays
  • Defines basic multiplication operation for primitive arrays
  • Defines Overflowing addition operation for primitive arrays
  • Defines Overflowing multiplication operation for primitive arrays
  • Defines Overflowing subtraction operation for primitive arrays
  • Defines basic reminder operation for primitive arrays
  • Defines saturating addition operation for primitive arrays
  • Defines saturating multiplication operation for primitive arrays
  • Defines saturating subtraction operation for primitive arrays
  • Defines basic subtraction operation for primitive arrays
  • Defines wrapping addition operation for primitive arrays
  • Defines wrapping multiplication operation for primitive arrays
  • Defines wrapping subtraction operation for primitive arrays

Functions