wgtmac opened a new pull request, #2699:
URL: https://github.com/apache/orc/pull/2699

   ### What changes were proposed in this pull request?
   
   Add a RowReaderOptions flag that lets timestamp readers use the writer 
timezone recorded in each stripe footer instead of the configured reader 
timezone. This preserves the stored timestamp value for callers that need to 
avoid ORC timestamp timezone conversion.
   
   ### Why are the changes needed?
   
   In old days, ORC only supports orc::TIMESTAMP type. The semantics of 
orc::TIMESTAMP is equivalent to TIMESTAMP_NTZ but with a complex writer and 
reader timezone adjustment.  So it is difficult to support both TIMESTAMP_NTZ 
and TIMESTAMP_LTZ types using a single orc::TIMESTAMP. In later versions, 
orc::TIMESTAMP_INSTANT has been added to support TIMESTAMP_LTZ type. However, 
users may not know the difference under the hood and still use legacy systems 
to write both TIMESTAMP_LTZ and TIMESTAMP_NTZ semantics to the old 
orc::TIMESTAMP type. When users use orc::TIMESTAMP as TIMESTAMP_LTZ values, we 
should set reader timezone to the writer timezone to avoid value conversion. 
However, users may not know the writer timezone in advance and ORC files may 
have different writer timezone (considering files are produced by teams in 
different time zones.) We need an approach to enforce reader to use writer 
timezone via explicit configuration.
   
   ### How was this patch tested?
   
   Added a new test case.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Codex GPT-5.6 Sol
   


-- 
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: [email protected]

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

Reply via email to