MaxGekk commented on a change in pull request #26455: [SPARK-29819][SQL] 
Introduce an enum for interval units
URL: https://github.com/apache/spark/pull/26455#discussion_r344464793
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/IntervalUtils.scala
 ##########
 @@ -28,6 +28,22 @@ import org.apache.spark.unsafe.types.{CalendarInterval, 
UTF8String}
 
 object IntervalUtils {
 
+  object IntervalUnit extends Enumeration {
+    type IntervalUnit = Value
+
+    val Nanosecond = Value(0, "nanosecond")
+    val Microsecond = Value(1, "microsecond")
+    val Millisecond = Value(2, "millisecond")
+    val Second = Value(3, "second")
+    val Minute = Value(4, "minute")
+    val Hour = Value(5, "hour")
+    val Day = Value(6, "day")
+    val Week = Value(7, "week")
+    val Month = Value(8, "month")
+    val Year = Value(9, "year")
 
 Review comment:
   This contradicts to the Scala coding style guide: 
https://github.com/databricks/scala-style-guide#naming-convention `Enums should 
be PascalCase.`

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

Reply via email to