Skip to content

Handle the timezone in extract week in temporal.rs #1380

Closed

Description

@Ted-Jiang

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

/// Extracts the week of a given temporal array as an array of integers
pub fn week<T>(array: &PrimitiveArray<T>) -> Result<Int32Array>
where
    T: ArrowTemporalType + ArrowNumericType,
    i64: std::convert::From<T::Native>,
{
    let mut b = Int32Builder::new(array.len());

    match array.data_type() {
        &DataType::Date32 | &DataType::Date64 | &DataType::Timestamp(_, None) => {
            extract_component_from_array!(array, b, iso_week, week, value_as_datetime)
        }
        dt => return_compute_error_with!("week does not support", dt),
    }

    Ok(b.finish())
}

Now week not support Timestamp with timezone.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Activity

  1. waitingkuo commented on Nov 29, 2022

    @waitingkuo
    Contributor

    @Ted-Jiang i think this is solved in some pr. i added a test case to close this issue

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions