adriangb commented on code in PR #25161:
URL: https://github.com/apache/datafusion/pull/25161#discussion_r3981750567


##########
datafusion/functions/src/datetime/from_unixtime.rs:
##########
@@ -40,31 +48,59 @@ use datafusion_macros::user_doc;
 +-----------------------------------------------------------+
 | 2020-09-08T09:42:29-04:00                                 |
 +-----------------------------------------------------------+
+
+-- Without an explicit timezone the session time zone is used
+> SET datafusion.execution.time_zone = 'America/New_York';
+> select from_unixtime(1599572549);
++----------------------------------+
+| from_unixtime(Int64(1599572549)) |
++----------------------------------+
+| 2020-09-08T09:42:29-04:00        |
++----------------------------------+
 ```"#,
     standard_argument(name = "expression",),
     argument(
         name = "timezone",
-        description = "Optional timezone to use when converting the integer to 
a timestamp. If not provided, the default timezone is UTC."
+        description = "Optional timezone to use when converting the integer to 
a timestamp. If not provided, the session time zone 
(`datafusion.execution.time_zone`) is used, which is unset (timezone-naive) by 
default."
     )
 )]
 #[derive(Debug, PartialEq, Eq, Hash)]
 pub struct FromUnixtimeFunc {
     signature: Signature,
+    /// Timezone from `datafusion.execution.time_zone`, used by the
+    /// single-argument form. The two-argument form always uses the timezone
+    /// given explicitly as the second argument.
+    timezone: Option<Arc<str>>,
 }
 
 impl Default for FromUnixtimeFunc {
     fn default() -> Self {
-        Self::new()
+        Self::new_with_config(&ConfigOptions::default())
     }
 }
 
 impl FromUnixtimeFunc {
+    #[deprecated(since = "55.0.0", note = "use `new_with_config` instead")]

Review Comment:
   55.0.0 is realeased, this should be deprecated in 56.0.0



-- 
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]

Reply via email to