Skip to content

Introduce TimestampNs, TimestampTzNs support for Bucket transforms #1110

Open
@sungwy

Description

@sungwy

Is your feature request related to a problem or challenge?

While working on introducing timestamp_ns and timestamptz_ns support in PyIceberg, I noticed that Bucket transform in iceberg-rust currently doesn't support the transforms for these two types.

Example Error:

FeatureUnsupported => Unsupported data type for bucket transform: Timestamp(Nanosecond, Some("Etc/GMT+10"))

There is currently support for microsecond timestamp, but not for nanoseconds timestamps:

DataType::Time64(TimeUnit::Microsecond) => input
.as_any()
.downcast_ref::<arrow_array::Time64MicrosecondArray>()
.unwrap()
.unary(|v| self.bucket_time(v)),
DataType::Timestamp(TimeUnit::Microsecond, _) => input
.as_any()
.downcast_ref::<arrow_array::TimestampMicrosecondArray>()
.unwrap()
.unary(|v| self.bucket_timestamp(v)),

Describe the solution you'd like

Bucket transform should successfully be able to transform TimestampNs and TimestampTzNs.

Willingness to contribute

I can contribute to this feature independently

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions