yaooqinn commented on a change in pull request #26337: [SPARK-29679][SQL] Make 
interval type comparable and orderable
URL: https://github.com/apache/spark/pull/26337#discussion_r342364403
 
 

 ##########
 File path: 
common/unsafe/src/main/java/org/apache/spark/unsafe/types/CalendarInterval.java
 ##########
 @@ -20,16 +20,19 @@
 import java.io.Serializable;
 import java.util.Objects;
 
+import scala.math.Ordered;
+
 /**
  * The internal representation of interval type.
  */
-public final class CalendarInterval implements Serializable {
+public final class CalendarInterval implements Serializable, 
Ordered<CalendarInterval> {
   public static final long MICROS_PER_MILLI = 1000L;
   public static final long MICROS_PER_SECOND = MICROS_PER_MILLI * 1000;
   public static final long MICROS_PER_MINUTE = MICROS_PER_SECOND * 60;
   public static final long MICROS_PER_HOUR = MICROS_PER_MINUTE * 60;
   public static final long MICROS_PER_DAY = MICROS_PER_HOUR * 24;
   public static final long MICROS_PER_WEEK = MICROS_PER_DAY * 7;
+  public static final long MICROS_PER_MONTH = MICROS_PER_DAY * 30;
 
 Review comment:
   I leave it here by mistake, will delete it

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