MaxGekk commented on a change in pull request #25336: [SPARK-28017][SQL]
Support additional levels of truncations by DATE_TRUNC/TRUNC
URL: https://github.com/apache/spark/pull/25336#discussion_r310484765
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
##########
@@ -620,26 +620,43 @@ object DateTimeUtils {
// Visible for testing.
private[sql] val TRUNC_TO_YEAR = 1
private[sql] val TRUNC_TO_MONTH = 2
- private[sql] val TRUNC_TO_QUARTER = 3
- private[sql] val TRUNC_TO_WEEK = 4
- private[sql] val TRUNC_TO_DAY = 5
- private[sql] val TRUNC_TO_HOUR = 6
- private[sql] val TRUNC_TO_MINUTE = 7
- private[sql] val TRUNC_TO_SECOND = 8
+ private[sql] val TRUNC_TO_DECADE = 3
Review comment:
I have sorted by lengths in 2 separate ranges for `DATE`/`TIMESTAMP` and for
`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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]