cht42 commented on code in PR #19829:
URL: https://github.com/apache/datafusion/pull/19829#discussion_r2702600623


##########
datafusion/spark/src/function/datetime/mod.rs:
##########
@@ -85,24 +91,43 @@ pub mod expr_fn {
         "Returns the first date which is later than start_date and named as 
indicated. The function returns NULL if at least one of the input parameters is 
NULL.",
         arg1 arg2
     ));
+    export_functions!((
+        date_trunc,
+        "Truncates a timestamp `ts` to the unit specified by the format 
`fmt`.",
+        fmt ts
+    ));
+    export_functions!((
+        time_trunc,
+        "Truncates a time `t` to the unit specified by the format `fmt`.",
+        fmt t
+    ));
+    export_functions!((
+        trunc,
+        "Truncates a date `dt` to the unit specified by the format `fmt`.",
+        dt fmt
+    ));
     export_functions!((
         date_part,
         "Extracts a part of the date or time from a date, time, or timestamp 
expression.",
         arg1 arg2
+
     ));
 }
 
 pub fn functions() -> Vec<Arc<ScalarUDF>> {
     vec![

Review Comment:
   changes are because i sorted alphabetically



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