Package org.apache.spark.sql.types
Class DayTimeIntervalType
Object
org.apache.spark.sql.types.DataType
org.apache.spark.sql.types.DayTimeIntervalType
- All Implemented Interfaces:
Serializable,scala.Equals,scala.Product
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic DayTimeIntervalTypeapply()static DayTimeIntervalTypeapply(byte field) abstract static booleanstatic byteDAY()static scala.collection.immutable.Seq<Object>static DayTimeIntervalTypeDEFAULT()intThe day-time interval type has constant precision.byteendField()abstract static booleanstatic StringfieldToString(byte field) static byteHOUR()static byteMINUTE()abstract static intabstract static ObjectproductElement(int n) static StringproductElementName(int n) static scala.collection.Iterator<String>static scala.collection.Iterator<Object>static Stringstatic byteSECOND()bytetypeName()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 class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-
fieldToString
-
stringToField
-
DEFAULT
-
apply
-
apply
-
canEqual
-
equals
-
productArity
public abstract static int productArity() -
productElement
-
productIterator
-
productPrefix
-
productElementName
-
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 toLong.- Specified by:
defaultSizein classDataType- Returns:
- (undocumented)
-
typeName
Description copied from class:DataTypeName of the type used in JSON serialization.
-