sdf-jkl opened a new issue, #10102: URL: https://github.com/apache/arrow-rs/issues/10102
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.** <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] (This section helps Arrow developers understand the context and *why* for this feature, in addition to the *what*) --> 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 *mimics* `arrow-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** <!-- A clear and concise description of what you want to happen. --> 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. **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. --> cc @klion26 @AdamGS -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
