Description
Using the Thrift jdbc interface.
The insert of the value of "1970-01-01 00:00:00.123456789" to a timestamp column, inserts a NULL into the database. I am aware the of the change
From 1.5 releases notes Timestamp Type’s precision is reduced to 1 microseconds (1us). However, to be compatible with previous versions, I would suggest either rounding or truncating the fractional seconds not inserting a NULL.
Attachments
Issue Links
- links to
Here is an example. In 1.5 and 1.6, we have
In 1.4, we have
sqlContext.sql("select cast('1970-01-01 00:00:00.123456789' as timestamp), cast('1970-01-01 00:00:00.123456' as timestamp)").collect res7: Array[org.apache.spark.sql.Row] = Array([1970-01-01 00:00:00.123456789,1970-01-01 00:00:00.123456])