object IntervalUtils

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IntervalUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def add(left: CalendarInterval, right: CalendarInterval): CalendarInterval

    Return a new calendar interval instance of the sum of two intervals.

  5. def addExact(left: CalendarInterval, right: CalendarInterval): CalendarInterval

    Return a new calendar interval instance of the sum of two intervals.

    Return a new calendar interval instance of the sum of two intervals.

    Exceptions thrown

    ArithmeticException if the result overflows any field value

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. def divide(interval: CalendarInterval, num: Double): CalendarInterval

    Return a new calendar interval instance of the left interval divides by a dividend.

  9. def divideExact(interval: CalendarInterval, num: Double): CalendarInterval

    Return a new calendar interval instance of the left interval divides by a dividend.

    Return a new calendar interval instance of the left interval divides by a dividend.

    Exceptions thrown

    ArithmeticException if the result overflows any field value or divided by zero

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def fromDayTimeString(input: String, from: IntervalUnit, to: IntervalUnit): CalendarInterval

    Parse dayTime string in form: [-]d HH:mm:ss.nnnnnnnnn and [-]HH:mm:ss.nnnnnnnnn

    Parse dayTime string in form: [-]d HH:mm:ss.nnnnnnnnn and [-]HH:mm:ss.nnnnnnnnn

    adapted from HiveIntervalDayTime.valueOf. Below interval conversion patterns are supported: - DAY TO (HOUR|MINUTE|SECOND) - HOUR TO (MINUTE|SECOND) - MINUTE TO SECOND

  14. def fromDayTimeString(s: String): CalendarInterval

    Parse dayTime string in form: [-]d HH:mm:ss.nnnnnnnnn and [-]HH:mm:ss.nnnnnnnnn

    Parse dayTime string in form: [-]d HH:mm:ss.nnnnnnnnn and [-]HH:mm:ss.nnnnnnnnn

    adapted from HiveIntervalDayTime.valueOf

  15. def fromYearMonthString(input: String): CalendarInterval

    Parse YearMonth string in form: [+|-]YYYY-MM

    Parse YearMonth string in form: [+|-]YYYY-MM

    adapted from HiveIntervalYearMonth.valueOf

  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def getDays(interval: CalendarInterval): Int
  18. def getDuration(interval: CalendarInterval, targetUnit: TimeUnit, daysPerMonth: Int = 31): Long

    Gets interval duration

    Gets interval duration

    interval

    The interval to get duration

    targetUnit

    Time units of the result

    daysPerMonth

    The number of days per one month. The default value is 31 days per month. This value was taken as the default because it is used in Structured Streaming for watermark calculations. Having 31 days per month, we can guarantee that events are not dropped before the end of any month (February with 29 days or January with 31 days).

    returns

    Duration in the specified time units

  19. def getHours(interval: CalendarInterval): Long
  20. def getMinutes(interval: CalendarInterval): Byte
  21. def getMonths(interval: CalendarInterval): Byte
  22. def getSeconds(interval: CalendarInterval): Decimal
  23. def getYears(interval: CalendarInterval): Int
  24. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. def isNegative(interval: CalendarInterval, daysPerMonth: Int = 31): Boolean

    Checks the interval is negative

    Checks the interval is negative

    interval

    The checked interval

    daysPerMonth

    The number of days per one month. The default value is 31 days per month. This value was taken as the default because it is used in Structured Streaming for watermark calculations. Having 31 days per month, we can guarantee that events are not dropped before the end of any month (February with 29 days or January with 31 days).

    returns

    true if duration of the given interval is less than 0 otherwise false

  27. def makeInterval(years: Int, months: Int, weeks: Int, days: Int, hours: Int, mins: Int, secs: Decimal): CalendarInterval
  28. def multiply(interval: CalendarInterval, num: Double): CalendarInterval

    Return a new calendar interval instance of the left interval times a multiplier.

  29. def multiplyExact(interval: CalendarInterval, num: Double): CalendarInterval

    Return a new calendar interval instance of the left interval times a multiplier.

    Return a new calendar interval instance of the left interval times a multiplier.

    Exceptions thrown

    ArithmeticException if the result overflows any field value

  30. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. def negate(interval: CalendarInterval): CalendarInterval

    Unary minus, return the negated the calendar interval value.

  32. def negateExact(interval: CalendarInterval): CalendarInterval

    Unary minus, return the negated the calendar interval value.

    Unary minus, return the negated the calendar interval value.

    Exceptions thrown

    ArithmeticException if the result overflows any field value

  33. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  35. def safeStringToInterval(input: UTF8String): CalendarInterval

    A safe version of stringToInterval.

    A safe version of stringToInterval. It returns null for invalid input string.

  36. def stringToInterval(input: UTF8String): CalendarInterval

    Converts a string to CalendarInterval case-insensitively.

    Converts a string to CalendarInterval case-insensitively.

    Exceptions thrown

    IllegalArgumentException if the input string is not in valid interval format.

  37. def subtract(left: CalendarInterval, right: CalendarInterval): CalendarInterval

    Return a new calendar interval instance of the left interval minus the right one.

  38. def subtractExact(left: CalendarInterval, right: CalendarInterval): CalendarInterval

    Return a new calendar interval instance of the left interval minus the right one.

    Return a new calendar interval instance of the left interval minus the right one.

    Exceptions thrown

    ArithmeticException if the result overflows any field value

  39. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  40. def toString(): String
    Definition Classes
    AnyRef → Any
  41. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  44. object IntervalUnit extends Enumeration

Inherited from AnyRef

Inherited from Any

Ungrouped