alamb commented on code in PR #6873:
URL: https://github.com/apache/arrow-datafusion/pull/6873#discussion_r1256111218


##########
datafusion/expr/src/built_in_function.rs:
##########
@@ -687,6 +691,9 @@ impl BuiltinScalarFunction {
             }
             BuiltinScalarFunction::CurrentDate => Ok(Date32),
             BuiltinScalarFunction::CurrentTime => Ok(Time64(Nanosecond)),
+            BuiltinScalarFunction::CurrentTimestamp => {
+                Ok(Timestamp(Nanosecond, Some("+00:00".into())))

Review Comment:
   Maybe we could combine this with the case for `Now` to show they are the 
same function (just aliased)
   



##########
datafusion/expr/src/expr_fn.rs:
##########
@@ -747,6 +747,7 @@ scalar_expr!(
 scalar_expr!(CurrentDate, current_date, ,"returns current UTC date as a 
[`DataType::Date32`] value");
 scalar_expr!(Now, now, ,"returns current timestamp in nanoseconds, using the 
same value for all instances of now() in same statement");
 scalar_expr!(CurrentTime, current_time, , "returns current UTC time as a 
[`DataType::Time64`] value");
+scalar_expr!(CurrentTimestamp, current_timestamp, ,"returns current timestamp 
in nanoseconds, using the same value for all instances of current_timestamp() 
in same statement");

Review Comment:
   I recommend we also note this is an alias for `now()` so people don't get 
confused about when to use `now()` and when to use `current_timestamp`



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

Reply via email to