copperybean commented on a change in pull request #32601:
URL: https://github.com/apache/spark/pull/32601#discussion_r638603533
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/intervalExpressions.scala
##########
@@ -345,6 +345,109 @@ case class MakeInterval(
)
}
+// scalastyle:off line.size.limit
+@ExpressionDescription(
+ usage = "_FUNC_(days, hours, mins, secs) - Make DayTimeIntervalType duration
from days, hours, mins and secs.",
+ arguments = """
+ Arguments:
+ * days - the number of days, positive or negative
+ * hours - the number of hours, positive or negative
+ * mins - the number of minutes, positive or negative
+ * secs - the number of seconds with the fractional part in microsecond
precision.
+ """,
+ examples = """
+ Examples:
+ > SELECT _FUNC_(1, 12, 30, 01.001001);
+ 1 12:30:01.001001000
+ > SELECT _FUNC_(100, null, 3);
+ NULL
+ """,
+ since = "3.2.0",
+ group = "datetime_funcs")
+// scalastyle:on line.size.limit
+case class MakeDuration(
+ days: Expression,
+ hours: Expression,
+ mins: Expression,
+ secs: Expression,
+ failOnError: Boolean = SQLConf.get.ansiEnabled)
Review comment:
Well, IMO, we should keep the consistency with other functions such as
MakeInterval
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]