DayTimeIntervalType (Spark 4.2.0 JavaDoc)
- All Implemented Interfaces:
Serializable,scala.Equals,scala.Product
public class DayTimeIntervalType extends DataType implements scala.Product, Serializable
The type represents day-time intervals of the SQL standard. A day-time interval is made up of a contiguous subset of the following fields: - SECOND, seconds within minutes and possibly fractions of a second [0..59.999999], - MINUTE, minutes within hours [0..59], - HOUR, hours within days [0..23], - DAY, days in the range [0..106751991].
DayTimeIntervalType represents positive as well as negative day-time intervals.
param: startField The leftmost field which the type comprises of. Valid values: 0 (DAY), 1 (HOUR), 2 (MINUTE), 3 (SECOND). param: endField The rightmost field which the type comprises of. Valid values: 0 (DAY), 1 (HOUR), 2 (MINUTE), 3 (SECOND).
- Since:
- 3.2.0
- See Also:
-
Constructor Summary
Constructors
DayTimeIntervalType(byte startField, byte endField) -
Method Summary
apply()apply(byte field) abstract static booleanstatic byteDAY()static scala.collection.immutable.Seq<Object>DEFAULT()intThe day-time interval type has constant precision.
byteendField()abstract static booleanfieldToString(byte field) static byteHOUR()static byteMINUTE()abstract static intproductElement(int n) productElementName(int n) static scala.collection.Iterator<String>static scala.collection.Iterator<Object>static byteSECOND()bytestatic scala.collection.immutable.Map<String,Object> typeName()Name of the type used in JSON serialization.
Methods inherited from class org.apache.spark.sql.types.DataType
catalogString, COLLATIONS_METADATA_KEY, equalsIgnoreCaseAndNullability, equalsIgnoreNullability, equalsStructurally, equalsStructurallyByName, fromDDL, fromJson, json, parseTypeWithFallback, prettyJson, simpleString, sqlMethods inherited from interface scala.Equals
canEqual, equalsMethods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
-
Constructor Details
-
DayTimeIntervalType
public DayTimeIntervalType
(byte startField, byte endField)
-
-
Method Details
-
DAY
public static byte DAY()
-
HOUR
public static byte HOUR()
-
MINUTE
public static byte MINUTE()
-
SECOND
public static byte SECOND()
-
dayTimeFields
public static scala.collection.immutable.Seq<Object> dayTimeFields()
-
fieldToString
public static String fieldToString
(byte field) -
stringToField
public static scala.collection.immutable.Map<String,
Object> stringToField() -
DEFAULT
-
apply
-
apply
-
canEqual
public abstract static boolean canEqual
(Object that) -
equals
public abstract static boolean equals
(Object that) -
productArity
public abstract static int productArity()
-
productElement
public abstract static Object productElement
(int n) -
productIterator
public static scala.collection.Iterator<Object> productIterator()
-
productPrefix
public static String productPrefix()
-
productElementName
public static String productElementName
(int n) -
productElementNames
public static scala.collection.Iterator<String> productElementNames()
-
startField
public byte startField()
-
endField
public byte endField()
-
defaultSize
public int defaultSize()
The day-time interval type has constant precision. A value of the type always occupies 8 bytes. The DAY field is constrained by the upper bound 106751991 to fit to
Long.- Specified by:
defaultSizein classDataType- Returns:
- (undocumented)
-
typeName
Description copied from class:
DataTypeName of the type used in JSON serialization.
-