Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-12147

TimestampTZ functions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • C++ - Gandiva

    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

      Attachments

        Activity

          People

            Unassigned Unassigned
            yuanzhou Yuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: