Commits


Rok Mihevc authored and GitHub committed c386319decc
GH-34210: [C++] Make casting timestamp and duration zero-copy when TimeUnit matches (#34270) ### Rationale for this change Casting from e.g. `timestamp(s, "UTC")` to `timestamp(s)` could be a metadata only change, but is currently a multiplication operation. ### What changes are included in this PR? This change adds a zero-copy casting path for durations that have equal units and timestamps that have equal units and potentially different timezones. ### Are these changes tested? We test for correctness and zero-copy. ### Are there any user-facing changes? No. * Closes: #34210 Authored-by: Rok Mihevc <rok@mihevc.org> Signed-off-by: Rok Mihevc <rok@mihevc.org>