ajsquared commented on code in PR #25979:
URL: https://github.com/apache/datafusion/pull/25979#discussion_r4367126662
##########
datafusion/functions/src/datetime/to_local_time.rs:
##########
@@ -311,7 +310,10 @@ pub(crate) fn to_local_time(time_value: &ColumnarValue) ->
Result<ColumnarValue>
/// ```
///
/// See `test_adjust_to_local_time()` for example
-pub fn adjust_to_local_time<T: ArrowTimestampType>(ts: i64, tz: Tz) ->
Result<i64> {
+pub fn adjust_to_local_time<T: ArrowTimestampType>(
+ ts: i64,
+ tz: impl TimeZone + Copy,
Review Comment:
[P2] Changing the public timezone parameter from `Tz` to `impl TimeZone +
Copy` breaks downstream calls that rely on type inference. For example,
`adjust_to_local_time::<TimestampMicrosecondType>(0, "UTC".parse().unwrap())`
previously inferred `Tz`. The new signature gives `parse()` no concrete target
type, so the same call no longer compiles. Keep the public `Tz` signature and
delegate to a separately named generic helper that the Spark fixed-offset path
can also call.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]