HyukjinKwon commented on code in PR #56766:
URL: https://github.com/apache/spark/pull/56766#discussion_r3478208849
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala:
##########
@@ -700,6 +700,7 @@ object FunctionRegistry {
expressionBuilder("curdate", CurDateExpressionBuilder, setAlias = true),
expression[CurrentTimestamp]("current_timestamp"),
expression[CurrentTime]("current_time"),
+ expression[CurrentTime]("localtime", since = Some("4.3.0")),
Review Comment:
Non-blocking: because `localtime` is registered as an alias for
`CurrentTime` (prettyName `current_time`), `SELECT localtime()` yields a column
labeled `current_time(6)` (see `sql-expression-schema.md`), whereas the
parallel ANSI function `LOCALTIMESTAMP` is its own expression and self-labels
as `localtimestamp()`. The aliasing is semantically correct (Spark `TIME` is
always WITHOUT TIME ZONE, so `LOCALTIME` == `CURRENT_TIME`), so this is only a
cosmetic naming inconsistency — worth a thought if ANSI users expect
`localtime()` to self-label.
--
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]