You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Variant] Align cast logic between variant_get and cast kernel for temporal types (Timestamp/Date/Time) #10102
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
This is part of #8982 which wants to support the temporal types (Timestamp* incl. NTZ + timezone, Date32/Date64, Time32*/Time64*).
Currently the temporal cast logic in parquet-variant-compute (type_conversion.rs) hand-rolls conversion/truncation logic that mimicsarrow-cast rather than reusing it. For example, several Time*/Timestamp* impls return None when there is leftover sub-second precision instead of truncating the way arrow-cast does (lossy is the default in the cast kernel).
Describe the solution you'd like
Align the logic of casting from/to the temporal types in parquet-variant with arrow-cast by reusing arrow-cast's scalar conversion primitives (the same approach #9688 took for decimals, where rescale_decimal / parse_string_to_decimal_native / single_float_to_decimal were exposed and reused) instead of re-implementing the logic. This keeps a single source of truth for the cast semantics and lets the perfect-shredding fast path (can_use_perfect_shredding_arrow_cast, added in #9862) be widened to cover the truncating temporal pairs it currently excludes.
changed the title [-]Align cast logic between variant_get and cast kernel for temporal types (Timestamp/Date/Time)[/-][+][Variant] Align cast logic between `variant_get` and `cast` kernel for temporal types (Timestamp/Date/Time)[/+]on Jun 9, 2026
Activity
[-]Align cast logic between variant_get and cast kernel for temporal types (Timestamp/Date/Time)[/-][+][Variant] Align cast logic between `variant_get` and `cast` kernel for temporal types (Timestamp/Date/Time)[/+]klion26 commentedon Jun 11, 2026
Thanks for creating this issue. I'll take a look at this after the utf8 related cast issue is completed.