Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
hi arrow developers,
Gandiva supports timestamp related functions already - but it looks like UTC only. It would be nice to support TimestampTZ(timestamp with timezone) also. Pass timestamp w/ timezone to those functions will return wrong result(should consider the timezone offset)
https://github.com/apache/arrow/blob/master/cpp/src/gandiva/precompiled/time.cc#L41
I guess we could provide a helper func like below to convert to timestamp w/ UTC first, then all existing functions should be working correctly.
ConvertTIMESTAMP(timestamp, timezone)
A better way may require re-implement those functions by considering the zone offset when doing calculating, but this may make the code looks complicated.
Note, castTIMESTAMP_utf8 supports creating timestamp with timezone already.
https://github.com/apache/arrow/blob/master/cpp/src/gandiva/precompiled/time.cc#L618-L743
thanks, -yuan