Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-21353

Use Instant instead of ZonedDateTime as the internal type for TIMESTAMP WITH LOCAL TIME ZONE

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Currently Hive uses the ZonedDateTime class to represent TIMESTAMP WITH LOCAL TIME ZONE values although that type shall behave like an Instant.

      In fact, the behaviour of TIMESTAMP WITH LOCAL TIME ZONE has already been updated to match the desired Instant semantics, but it still uses the ZonedDateTime class in the background, which is counter-intuitive and results in overly complex logic. Additionally, it leads to the strange side-effect that in textfiles the values are stored in the writer's local time, and the writer's zone is stored with each individual value.

      Using Instant instead of ZonedDateTime will:

      • simplify the internal logic
      • allow saving UTC-normalized values into textfile tables
      • allow adding support for tables of file formats other than textfile

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zi Zoltan Ivanfi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: