Package org.apache.spark.sql.types
Class TimeType
Object
org.apache.spark.sql.types.DataType
org.apache.spark.sql.types.TimeType
- All Implemented Interfaces:
Serializable,scala.Equals,scala.Product
The time type represents a time value with fields hour, minute, second, up to microseconds. The
range of times supported is 00:00:00.000000 to 23:59:59.999999.
param: precision The time fractional seconds precision which indicates the number of decimal digits maintained following the decimal point in the seconds value. The supported range is [0, 6].
- Since:
- 4.1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
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
-
TimeType
public TimeType(int precision)
-
-
Method Details
-
MIN_PRECISION
public static int MIN_PRECISION() -
MICROS_PRECISION
public static int MICROS_PRECISION() -
MAX_PRECISION
public static int MAX_PRECISION() -
DEFAULT_PRECISION
public static int DEFAULT_PRECISION() -
NANOS_PRECISION
public static int NANOS_PRECISION() -
apply
-
precision
public int precision() -
defaultSize
public int defaultSize()The default size of a value of the TimeType is 8 bytes.- Specified by:
defaultSizein classDataType- Returns:
- (undocumented)
-
typeName
Description copied from class:DataTypeName of the type used in JSON serialization.
-