beliefer opened a new pull request #34741:
URL: https://github.com/apache/spark/pull/34741


   ### What changes were proposed in this pull request?
   #33588 (comment) show Spark cannot read/write timestamp ntz and ltz 
correctly. Based on the discussion 
https://github.com/apache/spark/pull/34712#issuecomment-981402675, we just to 
fix read/write timestamp ntz to Orc uses UTC timestamp.
   
   The root cause is Orc write/read timestamp with local timezone in default. 
The local timezone will be changed.
   If the Orc writer write timestamp with local timezone(e.g. 
America/Los_Angeles), when the Orc reader reading the timestamp with other 
local timezone(e.g. Europe/Amsterdam), the value of timestamp will be different.
   
   If we let the Orc writer write timestamp with UTC timezone, when the Orc 
reader reading the timestamp with UTC timezone too, the value of timestamp will 
be correct.
   
   The related Orc source:
   
https://github.com/apache/orc/blob/3f1e57cf1cebe58027c1bd48c09eef4e9717a9e3/java/core/src/java/org/apache/orc/impl/WriterImpl.java#L525
   
   
https://github.com/apache/orc/blob/1f68ac0c7f2ae804b374500dcf1b4d7abe30ffeb/java/core/src/java/org/apache/orc/impl/TreeReaderFactory.java#L1184
   
   ### Why are the changes needed?
   Fix the bug about read/write timestamp ntz from/to Orc with different times 
zone.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No. Orc timestamp ntz is a new feature not release yet.
   
   
   ### How was this patch tested?
   New tests.
   


-- 
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.

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to