object IntervalUtils extends SparkIntervalUtils

Linear Supertypes
SparkIntervalUtils, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IntervalUtils
  2. SparkIntervalUtils
  3. AnyRef
  4. 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. val MAX_DAY: Long
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils
  5. val MAX_HOUR: Long
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils
  6. val MAX_MINUTE: Long
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils
  7. val MAX_SECOND: Long
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils
  8. val MIN_SECOND: Long
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils
  9. def add(left: CalendarInterval, right: CalendarInterval): CalendarInterval

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

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

  11. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  12. def castDayTimeStringToInterval(input: String, startField: Byte, endField: Byte): CalendarInterval
  13. def castStringToDTInterval(input: UTF8String, startField: Byte, endField: Byte): Long
  14. def castStringToYMInterval(input: UTF8String, startField: Byte, endField: Byte): Int
  15. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  16. val dayStr: UTF8String
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils
  17. def dayTimeIntervalToByte(v: Long, startField: Byte, endField: Byte): Byte
  18. def dayTimeIntervalToDecimal(v: Long, endField: Byte): Decimal
  19. def dayTimeIntervalToInt(v: Long, startField: Byte, endField: Byte): Int
  20. def dayTimeIntervalToLong(v: Long, startField: Byte, endField: Byte): Long
  21. def dayTimeIntervalToShort(v: Long, startField: Byte, endField: Byte): Short
  22. def decimalToDayTimeInterval(d: Decimal, p: Int, s: Int, startField: Byte, endField: Byte): Long
  23. def decimalToYearMonthInterval(d: Decimal, p: Int, s: Int, startField: Byte, endField: Byte): Int
  24. def divide(interval: CalendarInterval, num: Double): CalendarInterval

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

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

  26. def durationToMicros(duration: Duration, endField: Byte): Long
    Definition Classes
    SparkIntervalUtils
  27. def durationToMicros(duration: Duration): Long
    Definition Classes
    SparkIntervalUtils
  28. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  30. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  31. def fromDayTimeString(input: String, from: Byte, to: Byte): CalendarInterval

    Parse day-time interval in form: [-]d HH:mm:ss.nnnnnnnnn and [-]HH:mm:ss.nnnnnnnnn

    Parse day-time interval in form: [-]d HH:mm:ss.nnnnnnnnn and [-]HH:mm:ss.nnnnnnnnn

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

  32. def fromDayTimeString(s: String): CalendarInterval

    Parse day-time interval in form: [-]d HH:mm:ss.nnnnnnnnn and [-]HH:mm:ss.nnnnnnnnn

    Parse day-time interval in form: [-]d HH:mm:ss.nnnnnnnnn and [-]HH:mm:ss.nnnnnnnnn

    adapted from HiveIntervalDayTime.valueOf

  33. def fromIntervalString(input: String): CalendarInterval

    Parse all kinds of interval literals including unit-to-unit form and unit list form

  34. def fromYearMonthString(input: String, startField: Byte, endField: Byte): CalendarInterval

    Parse year-month interval in form: [+|-]YYYY-MM

    Parse year-month interval in form: [+|-]YYYY-MM

    adapted from HiveIntervalYearMonth.valueOf Below interval conversion patterns are supported: - YEAR TO (YEAR|MONTH)

  35. def fromYearMonthString(input: String): CalendarInterval

    Parse year-month interval in form: [+|-]YYYY-MM

    Parse year-month interval in form: [+|-]YYYY-MM

    adapted from HiveIntervalYearMonth.valueOf

  36. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  37. def getDays(interval: CalendarInterval): Int
  38. def getDays(microseconds: Long): Int
  39. 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

  40. def getHours(interval: CalendarInterval): Byte
  41. def getHours(microseconds: Long): Byte
  42. def getMinutes(interval: CalendarInterval): Byte
  43. def getMinutes(microseconds: Long): Byte
  44. def getMonths(interval: CalendarInterval): Byte
  45. def getMonths(months: Int): Byte
  46. def getSeconds(interval: CalendarInterval): Decimal
  47. def getSeconds(microseconds: Long): Decimal
  48. def getYears(interval: CalendarInterval): Int
  49. def getYears(months: Int): Int
  50. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  51. val hourStr: UTF8String
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils
  52. def intToDayTimeInterval(v: Int, startField: Byte, endField: Byte): Long
  53. def intToYearMonthInterval(v: Int, startField: Byte, endField: Byte): Int
  54. val intervalStr: UTF8String
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils
  55. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  56. 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

  57. def longToDayTimeInterval(v: Long, startField: Byte, endField: Byte): Long
  58. def longToYearMonthInterval(v: Long, startField: Byte, endField: Byte): Int
  59. def makeDayTimeInterval(days: Int, hours: Int, mins: Int, secs: Decimal): Long
  60. def makeInterval(years: Int, months: Int, weeks: Int, days: Int, hours: Int, mins: Int, secs: Decimal): CalendarInterval
  61. val microsStr: UTF8String
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils
  62. def microsToDuration(micros: Long): Duration
    Definition Classes
    SparkIntervalUtils
  63. val millisStr: UTF8String
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils
  64. val minuteStr: UTF8String
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils
  65. val monthStr: UTF8String
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils
  66. def monthsToPeriod(months: Int): Period
    Definition Classes
    SparkIntervalUtils
  67. def multiply(interval: CalendarInterval, num: Double): CalendarInterval

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

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

  69. val nanosStr: UTF8String
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils
  70. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  71. def negate(interval: CalendarInterval): CalendarInterval

    Unary minus, return the negated the calendar interval value.

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

  73. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  74. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  75. def periodToMonths(period: Period, endField: Byte): Int
    Definition Classes
    SparkIntervalUtils
  76. def periodToMonths(period: Period): Int
    Definition Classes
    SparkIntervalUtils
  77. def safeStringToInterval(input: UTF8String): CalendarInterval

    A safe version of stringToInterval.

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

  78. val secondStr: UTF8String
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils
  79. def stringToInterval(input: UTF8String): CalendarInterval
    Definition Classes
    SparkIntervalUtils
  80. def subtract(left: CalendarInterval, right: CalendarInterval): CalendarInterval

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

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

  82. val supportedFormat: Map[(Byte, Byte), Seq[String]]
  83. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  84. def toDTInterval(minute: String, second: String, sign: Int): Long
  85. def toDTInterval(hour: String, minute: String, second: String, sign: Int): Long
  86. def toDTInterval(day: String, hour: String, minute: String, second: String, sign: Int): Long
  87. def toDayTimeIntervalString(micros: Long, style: IntervalStyle, startField: Byte, endField: Byte): String
    Definition Classes
    SparkIntervalUtils
  88. def toString(): String
    Definition Classes
    AnyRef → Any
  89. def toYearMonthIntervalString(months: Int, style: IntervalStyle, startField: Byte, endField: Byte): String
    Definition Classes
    SparkIntervalUtils
  90. def unitToUtf8(unit: String): UTF8String
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils
  91. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  92. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  93. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  94. val weekStr: UTF8String
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils
  95. def yearMonthIntervalToByte(v: Int, startField: Byte, endField: Byte): Byte
  96. def yearMonthIntervalToInt(v: Int, startField: Byte, endField: Byte): Int
  97. def yearMonthIntervalToShort(v: Int, startField: Byte, endField: Byte): Short
  98. val yearStr: UTF8String
    Attributes
    protected
    Definition Classes
    SparkIntervalUtils

Inherited from SparkIntervalUtils

Inherited from AnyRef

Inherited from Any

Ungrouped