ConstDuration / New Layer
Create a new column with a constant duration value (fixed time interval). Similar to Rust's std::time::Duration, Arrow's Duration type, or pandas Timedelta. Represents an exact time span (e.g., '24 hours') rather than calendar-relative time (e.g., '1 day' which can vary with DST). For calendar-relative durations, use date/time offset operations instead.
TimeUnit
enumStorage precision for the duration, following Arrow's Duration type granularity options.
Nanosecond precision (10^-9 seconds). Equivalent to Arrow's TimeUnit::NANO
Microsecond precision (10^-6 seconds). Equivalent to Arrow's TimeUnit::MICRO
Millisecond precision (10^-3 seconds). Equivalent to Arrow's TimeUnit::MILLI
DurationValue
[, ...]Component of a duration specification. Similar to Rust's Duration construction or Arrow's duration building blocks.
DurationUnit
enumUnit for specifying duration components. Similar to Rust's Duration::from_* methods or pandas Timedelta units. Each unit can be used once; if repeated, the last value takes precedence.
Nanoseconds (ns). Smallest supported unit, 10^-9 seconds
Microseconds (μs). 10^-6 seconds
Milliseconds (ms). 10^-3 seconds
Seconds (s). Base unit for time measurements
Minutes (min). 60 seconds
Hours (h). 3600 seconds
Days (d). Exactly 24 hours (86400 seconds), regardless of DST
Weeks (w). Exactly 7 days (604800 seconds)
Value
i64Quantity of the specified unit. Can be negative for representing negative durations.
AsColumn
nameName 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.