Modulus / Operator Layer

Calculate the remainder after division between numeric columns or by a constant value. Similar to Python's % operator, pandas mod(), or R's %% operator.

Mathematical form: for constant modulus, or for column modulus.

Common applications:

  • Cyclic calculations (hours in day)
  • Even/odd determination
  • Wraparound operations
  • Remainder after distribution
  • Time cycle analysis
  • Hash bucket assignment

Note: Modulus by zero results in null values.

Table
0
0
Table

The dividend column for modulus operation. Must be numeric type. Forms the value being divided in modulus operations (e.g., timestamp, counter, measurement).

Integer
0

64-bit signed integer modulus. Range: -2^63 to 2^63-1. Examples:

  • %24 (hour of day)
  • %7 (day of week)
  • %2 (even/odd check)

Must be non-zero to avoid null results

0

64-bit unsigned integer modulus. Range: 0 to 2^64-1. Use cases:

  • Circular buffer indices
  • Hash table sizes
  • Rotation cycles

Must be non-zero to avoid null results

0

64-bit floating-point modulus. Useful for:

  • Periodic function calculations
  • Phase computations
  • Fractional cycle analysis

Must be non-zero to avoid null results

Other

column

The divisor column for element-wise modulus. Common pairs:

  • timestamp % period_length
  • value % bucket_size
  • count % batch_limit

Zero values result in null outputs

Name for the new column. If not provided, the system generates a unique name. If AsColumn matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.