TJX2014 edited a comment on pull request #29043:
URL: https://github.com/apache/spark/pull/29043#issuecomment-657024230


   @huaxingao
   Thank you for your detail response. 
   
   Actually, `Timestamp` in spark has the range '0001-01-01T00:00:00.000000Z, 
9999-12-31T23:59:59.999999Z', see `org.apache.spark.sql.types.TimestampType`(8 
bytes), and the relative date type seems should be `datetime` (8 bytes) in 
mysql, not the timestamp, only 4 bytes and have a smaller range '1970-01-01 
00:00:01.000000' to '2038-01-19 03:14:07.999999'.  
   
   In real test:
   We can not insert '1111-01-01 00:00:01'  from spark into TIMESTAMP column of 
mysql currently because of out of range.
   but we can insert the former '1111-01-01 00:00:01'into DATETIME column of 
mysql for `datetime` contains the range of `timestamp` in mysql.
   See: https://dev.mysql.com/doc/refman/5.7/en/datetime.html


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to