Skip to main content

lower_bound_for_ge

Function lower_bound_for_ge 

Source
fn lower_bound_for_ge(
    target_value: i64,
    source_unit: TimeUnit,
    target_unit: TimeUnit,
) -> Option<i64>
Expand description

Returns the smallest source-unit timestamp whose downcast is greater than or equal to target_value.

DataFusion timestamp downcasts truncate toward zero. For non-positive buckets that means the bucket starts before target_value * ratio, so <= x can be rewritten as < lower_bound(x+1) without dropping rows near zero or across negative boundaries.