Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0
    • Component/s: None
    • Labels:
      None

      Description

      When DateDatum#plus adds a time value to the self instance, it meaninglessly converts the time value to a local time and then converts the added value back to UTC, which results in error when the user time zone has a negative time offset.


      (Update 12/2/2014)

      After some discussions with Hyunsik and Jong-young, we concluded that DateDatum values must be treated as UTC values, not local times. The actual code change is almost the same as I originally intended, but the overall direction of this issue and upcoming ones are focused on aligning Tajo's timezone policy for date/time data types with PostgreSQL's.

      Changing the summary accordingly.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user gyias opened a pull request:

          https://github.com/apache/tajo/pull/278

          TAJO-1191: Change DateDatum timezone to UTC

          Currently, DateDatum is incorrectly treated as a local timezone based value. This change mainly updates plus & minus methods of some relevant classes and the class itself so that they don't convert a DateDatum value to UTC before executing an operation.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/gyias/tajo datedatum

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/tajo/pull/278.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #278


          commit 70fef1aa1e8f347dcc955f86f86852f29e4a189f
          Author: Jaewoong Jung <gyias@users.noreply.github.com>
          Date: 2014-11-21T07:43:01Z

          Merge pull request #1 from apache/master

          Sync with original master

          commit 90496c6c6b69f11af151d2e53052f792fec8dab3
          Author: Jaewoong Jung <jungjw@gmail.com>
          Date: 2014-12-02T07:47:36Z

          Make DateDatum UTC-based

          commit 0137df1b04d7dcb37d2fe3ccacf62f035247565c
          Author: Jaewoong Jung <gyias@users.noreply.github.com>
          Date: 2014-12-02T07:56:39Z

          Merge pull request #2 from apache/master

          Merge latest changes

          commit dc74f756e497f77eb40c286cbfd4c834edfede86
          Author: Jaewoong Jung <jungjw@gmail.com>
          Date: 2014-12-02T07:57:52Z

          Merge branch 'master' into datedatum

          commit 6f0044bbe03085322011a6aac203273afec9c894
          Author: Jaewoong Jung <jungjw@gmail.com>
          Date: 2014-12-02T08:29:00Z

          add a comment

          commit 054510771c4308e890fb052a551d223f5e17d574
          Author: Jaewoong Jung <jungjw@gmail.com>
          Date: 2014-12-03T06:31:32Z

          Fix IntervalDatum.java


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user gyias opened a pull request: https://github.com/apache/tajo/pull/278 TAJO-1191 : Change DateDatum timezone to UTC Currently, DateDatum is incorrectly treated as a local timezone based value. This change mainly updates plus & minus methods of some relevant classes and the class itself so that they don't convert a DateDatum value to UTC before executing an operation. You can merge this pull request into a Git repository by running: $ git pull https://github.com/gyias/tajo datedatum Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/278.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #278 commit 70fef1aa1e8f347dcc955f86f86852f29e4a189f Author: Jaewoong Jung <gyias@users.noreply.github.com> Date: 2014-11-21T07:43:01Z Merge pull request #1 from apache/master Sync with original master commit 90496c6c6b69f11af151d2e53052f792fec8dab3 Author: Jaewoong Jung <jungjw@gmail.com> Date: 2014-12-02T07:47:36Z Make DateDatum UTC-based commit 0137df1b04d7dcb37d2fe3ccacf62f035247565c Author: Jaewoong Jung <gyias@users.noreply.github.com> Date: 2014-12-02T07:56:39Z Merge pull request #2 from apache/master Merge latest changes commit dc74f756e497f77eb40c286cbfd4c834edfede86 Author: Jaewoong Jung <jungjw@gmail.com> Date: 2014-12-02T07:57:52Z Merge branch 'master' into datedatum commit 6f0044bbe03085322011a6aac203273afec9c894 Author: Jaewoong Jung <jungjw@gmail.com> Date: 2014-12-02T08:29:00Z add a comment commit 054510771c4308e890fb052a551d223f5e17d574 Author: Jaewoong Jung <jungjw@gmail.com> Date: 2014-12-03T06:31:32Z Fix IntervalDatum.java
          Hide
          hyunsik Hyunsik Choi added a comment -

          I just committed to master branch. Thank you for your contribution.

          Show
          hyunsik Hyunsik Choi added a comment - I just committed to master branch. Thank you for your contribution.
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Tajo-master-build #480 (See https://builds.apache.org/job/Tajo-master-build/480/)
          TAJO-1191: Change DateDatum timezone to UTC. (Jaewoong Jung via hyunsik) (hyunsik: rev 97507e45883c9db2fec2f5a9a9e544384a86ccd0)

          • tajo-common/src/main/java/org/apache/tajo/datum/DateDatum.java
          • tajo-common/src/main/java/org/apache/tajo/datum/TimeDatum.java
          • tajo-common/src/main/java/org/apache/tajo/datum/IntervalDatum.java
          • CHANGES
          • tajo-common/src/test/java/org/apache/tajo/datum/TestIntervalDatum.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #480 (See https://builds.apache.org/job/Tajo-master-build/480/ ) TAJO-1191 : Change DateDatum timezone to UTC. (Jaewoong Jung via hyunsik) (hyunsik: rev 97507e45883c9db2fec2f5a9a9e544384a86ccd0) tajo-common/src/main/java/org/apache/tajo/datum/DateDatum.java tajo-common/src/main/java/org/apache/tajo/datum/TimeDatum.java tajo-common/src/main/java/org/apache/tajo/datum/IntervalDatum.java CHANGES tajo-common/src/test/java/org/apache/tajo/datum/TestIntervalDatum.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Tajo-master-CODEGEN-build #121 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/121/)
          TAJO-1191: Change DateDatum timezone to UTC. (Jaewoong Jung via hyunsik) (hyunsik: rev 97507e45883c9db2fec2f5a9a9e544384a86ccd0)

          • tajo-common/src/main/java/org/apache/tajo/datum/IntervalDatum.java
          • tajo-common/src/main/java/org/apache/tajo/datum/TimeDatum.java
          • tajo-common/src/main/java/org/apache/tajo/datum/DateDatum.java
          • tajo-common/src/test/java/org/apache/tajo/datum/TestIntervalDatum.java
          • CHANGES
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-CODEGEN-build #121 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/121/ ) TAJO-1191 : Change DateDatum timezone to UTC. (Jaewoong Jung via hyunsik) (hyunsik: rev 97507e45883c9db2fec2f5a9a9e544384a86ccd0) tajo-common/src/main/java/org/apache/tajo/datum/IntervalDatum.java tajo-common/src/main/java/org/apache/tajo/datum/TimeDatum.java tajo-common/src/main/java/org/apache/tajo/datum/DateDatum.java tajo-common/src/test/java/org/apache/tajo/datum/TestIntervalDatum.java CHANGES

            People

            • Assignee:
              jungjw Jaewoong Jung
              Reporter:
              jungjw Jaewoong Jung
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development