-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
enhancementAny new improvement worthy of a entry in the changelogAny new improvement worthy of a entry in the changelog
Description
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
We have implemented the variant primitive to arrow types for all variant primitive types now(1-1 mapping), but maybe the user will pass a different type which is not a valid arrow primitive type, this issue wants to discuss which arrow types we will support transformed from variant primitive with cast, or we don't need to support these types.
Describe the solution you'd like
Here is data types I collected for now
| Arrow DataType | Variant primitive Type | Cast logic |
|---|---|---|
| Date64 | Date32 | Date32 * (24 * 60 * 60 * 1000)` |
| Timestamp_[ntz](Second) | Timestamp_[ntz](Micros/Nanos) | - use micros as an example - let the timestamp be t - there are two options for unhappy path 1. return None if t % 1000000 != 0 2 return floor[t / 1000000] |
| TImestamp_[ntz](Millisecond) | Timestamp_[ntz](Micros/Nanos) | Same as above |
| Time32(Second/Millisecond) | Time | same as above |
| Time64(Nanosecond) | Time(Macors) | same as above |
Describe alternatives you've considered
If there is any types we want to support, we can ref to the logic of variant_to_arrow.rs#make_variant_to_arrow_row_builder for more info
Additional context
liamzwbao
Metadata
Metadata
Assignees
Labels
enhancementAny new improvement worthy of a entry in the changelogAny new improvement worthy of a entry in the changelog