Skip to content

range function uses eager ok_or on the hot path #25307

Description

@niebayes

let neg = TimestampNanosecondType::add_month_day_nano(start, step, start_tz)
.ok_or(exec_datafusion_err!(
"Cannot generate timestamp range where start + step overflows"
))?
.cmp(&start)
== Ordering::Less;
let stop_dt =
as_datetime_with_timezone::<TimestampNanosecondType>(stop, stop_tz)
.ok_or(exec_datafusion_err!(
"Cannot generate timestamp for stop: {}: {:?}",
stop,
stop_tz
))?;
let mut current = start;
let mut current_dt =
as_datetime_with_timezone::<TimestampNanosecondType>(current, start_tz)
.ok_or(exec_datafusion_err!(
"Cannot generate timestamp for start: {}: {:?}",
current,
start_tz
))?;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions