MaxGekk commented on code in PR #50336:
URL: https://github.com/apache/spark/pull/50336#discussion_r2036803770
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/timeExpressions.scala:
##########
@@ -349,3 +353,109 @@ object SecondExpressionBuilder extends ExpressionBuilder {
}
}
+/**
+ * Returns the current time at the start of query evaluation.
+ * There is no code generation since this expression should get constant
folded by the optimizer.
+ */
+// scalastyle:off line.size.limit
+@ExpressionDescription(
+ usage = """
+ _FUNC_([precision]) - Returns the current time at the start of query
evaluation.
+ All calls of current_time within the same query return the same value.
+
+ _FUNC_ - Returns the current time at the start of query evaluation.
+ """,
+ arguments = """
+ Arguments:
+ * precision - An optional integer literal in the range
[${TimeType.MIN_PRECISION}..${TimeType.MICROS_PRECISION}], indicating how many
Review Comment:
I guess the constants ${TimeType.MIN_PRECISION} won't embedded in the
string. It should start from s" at least. Could you generate the doc, and
double check.
--
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]