Class TimestampConverter
java.lang.Object
com.databricks.jdbc.api.impl.converters.TimestampConverter
- All Implemented Interfaces:
ObjectConverter
-
Field Summary
Fields inherited from interface com.databricks.jdbc.api.impl.converters.ObjectConverter
DEFAULT_TIMESTAMP_SCALE, POWERS_OF_TEN -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.databricks.jdbc.api.impl.converters.ObjectConverter
toAsciiStream, toBigDecimal, toBigDecimal, toBinaryStream, toBoolean, toByte, toByteArray, toChar, toCharacterStream, toDatabricksArray, toDatabricksMap, toDatabricksStruct, toDouble, toFloat, toInt, toLocalDate, toShort, toTimestamp, toUnicodeStream
-
Constructor Details
-
TimestampConverter
public TimestampConverter()
-
-
Method Details
-
toTime
- Specified by:
toTimein interfaceObjectConverter- Throws:
DatabricksSQLException
-
toTimestamp
Converts an object to aTimestamp.The method supports various input formats depending on the mode:
- timestamp_ntz:
- Thrift Arrow:
timestamp yyyy-MM-dd HH:mm:ss.S - Thrift Inline:
yyyy-MM-dd HH:mm:ss.S(String) - Sea Inline:
yyyy-MM-dd'T'HH:mm:ss.SSS(String) - Sea Arrow:
timestamp yyyy-MM-dd HH:mm:ss.S
- Thrift Arrow:
- Timestamp:
- Thrift Arrow:
timestamp yyyy-MM-dd HH:mm:ss.S - Thrift Inline:
yyyy-MM-dd HH:mm:ss(String) - Sea Inline:
yyyy-MM-dd'T'HH:mm:ss.SSSXXX(String) - Sea Arrow:
yyyy-MM-dd HH:mm:ss.S
- Thrift Arrow:
- Specified by:
toTimestampin interfaceObjectConverter- Parameters:
object- the object to convert- Returns:
- the converted
Timestamp - Throws:
DatabricksSQLException- if the conversion fails
- timestamp_ntz:
-
toLong
- Specified by:
toLongin interfaceObjectConverter- Throws:
DatabricksSQLException
-
toBigInteger
- Specified by:
toBigIntegerin interfaceObjectConverter- Throws:
DatabricksSQLException
-
toString
- Specified by:
toStringin interfaceObjectConverter- Throws:
DatabricksSQLException
-
toDate
- Specified by:
toDatein interfaceObjectConverter- Throws:
DatabricksSQLException
-