shardulm94 edited a comment on issue #1116:
URL: https://github.com/apache/iceberg/issues/1116#issuecomment-645818922


   One interesting thing to note is that in the tests added by @edgarRd, if we 
run the test for each timezone individually, they work just fine. Only when the 
tests are run one after the other does it fail. I haven't debugged this deeply, 
but my best guess is that ORC uses ThreadLocals to store the local timezone 
(https://github.com/apache/hive/blob/204d8525bf48bf85d15feb427e6f5a31ec192bac/storage-api/src/java/org/apache/hadoop/hive/serde2/io/DateWritable.java#L48).
 And these ThreadLocals are not getting reset across tests which causes 
subsequent tests to reuse the timezones of previous tests. I tried to run the 
test for each timezone in a different thread within the for loop and the tests 
pass. So I don't think there is a bug in the conversion logic from Expression 
to ORC SearchArgument, but rather in how ORC chooses to maintain the current 
timezone as a thread local.


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