trait SparkIntervalUtils extends AnyRef
- Alphabetic
- By Inheritance
- SparkIntervalUtils
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
MAX_DAY: Long
- Attributes
- protected
-
val
MAX_HOUR: Long
- Attributes
- protected
-
val
MAX_MINUTE: Long
- Attributes
- protected
-
val
MAX_SECOND: Long
- Attributes
- protected
-
val
MIN_SECOND: Long
- Attributes
- protected
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
val
dayStr: UTF8String
- Attributes
- protected
- def durationToMicros(duration: Duration, endField: Byte): Long
-
def
durationToMicros(duration: Duration): Long
Converts this duration to the total length in microseconds.
Converts this duration to the total length in microseconds.
If this duration is too large to fit in a Long microseconds, then an exception is thrown.
If this duration has greater than microsecond precision, then the conversion will drop any excess precision information as though the amount in nanoseconds was subject to integer division by one thousand.
- returns
The total length of the duration in microseconds
- Exceptions thrown
ArithmeticException
If numeric overflow occurs
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
val
hourStr: UTF8String
- Attributes
- protected
-
val
intervalStr: UTF8String
- Attributes
- protected
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
microsStr: UTF8String
- Attributes
- protected
-
def
microsToDuration(micros: Long): Duration
Obtains a Duration representing a number of microseconds.
Obtains a Duration representing a number of microseconds.
- micros
The number of microseconds, positive or negative
- returns
A Duration, not null
-
val
millisStr: UTF8String
- Attributes
- protected
-
val
minuteStr: UTF8String
- Attributes
- protected
-
val
monthStr: UTF8String
- Attributes
- protected
-
def
monthsToPeriod(months: Int): Period
Obtains a Period representing a number of months.
Obtains a Period representing a number of months. The days unit will be zero, and the years and months units will be normalized.
The months unit is adjusted to have an absolute value < 12, with the years unit being adjusted to compensate. For example, the method returns "2 years and 3 months" for the 27 input months.
The sign of the years and months units will be the same after normalization. For example, -13 months will be converted to "-1 year and -1 month".
- months
The number of months, positive or negative
- returns
The period of months, not null
-
val
nanosStr: UTF8String
- Attributes
- protected
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def periodToMonths(period: Period, endField: Byte): Int
-
def
periodToMonths(period: Period): Int
Gets the total number of months in this period.
Gets the total number of months in this period.
This returns the total number of months in the period by multiplying the number of years by 12 and adding the number of months.
- returns
The total number of months in the period, may be negative
- Exceptions thrown
ArithmeticException
If numeric overflow occurs
-
val
secondStr: UTF8String
- Attributes
- protected
-
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.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toDayTimeIntervalString(micros: Long, style: IntervalStyle, startField: Byte, endField: Byte): String
Converts a day-time interval as a number of microseconds to its textual representation which conforms to the ANSI SQL standard.
Converts a day-time interval as a number of microseconds to its textual representation which conforms to the ANSI SQL standard.
- micros
The number of microseconds, positive or negative
- style
The style of textual representation of the interval
- startField
The start field (DAY, HOUR, MINUTE, SECOND) which the interval comprises of.
- endField
The end field (DAY, HOUR, MINUTE, SECOND) which the interval comprises of.
- returns
Day-time interval string
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
toYearMonthIntervalString(months: Int, style: IntervalStyle, startField: Byte, endField: Byte): String
Converts an year-month interval as a number of months to its textual representation which conforms to the ANSI SQL standard.
Converts an year-month interval as a number of months to its textual representation which conforms to the ANSI SQL standard.
- months
The number of months, positive or negative
- style
The style of textual representation of the interval
- startField
The start field (YEAR or MONTH) which the interval comprises of.
- endField
The end field (YEAR or MONTH) which the interval comprises of.
- returns
Year-month interval string
-
def
unitToUtf8(unit: String): UTF8String
- Attributes
- protected
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
val
weekStr: UTF8String
- Attributes
- protected
-
val
yearStr: UTF8String
- Attributes
- protected