Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-763

Out of range problem in utc_usec_to()

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.8.0, 0.9.0
    • Fix Version/s: 0.8.0, 0.9.0
    • Component/s: Function/UDF
    • Labels:
      None

      Description

      When I run the following query using the utc_usec_to function, I met an out of range error.
      Since this problem occurs only when converting to hour, it seems to relate with the time zone.

      default> select utc_usec_to('hour', (TIMESTAMP '2013-04-05 08:00:00')::INT8*1000);
      result: 1 rows (9 B)
      ?utc_usec_to
      -------------------------------
      1365116400000000
      
      default> select utc_usec_to('hour', (TIMESTAMP '2013-04-05 09:00:00')::INT8*1000);
      Value 24 for hourOfDay must be in the range [0,23]
      

        Activity

        Hide
        dilve Ilhyun Suh added a comment -

        This issue is due to getting 'clockhourOfDay' format instead of 'hourOfDay' format from DateTime value and reorganizing a new DateTime value with 'clockhourOfDay' formatted time value which is not accepted when building DateTime.
        II have also made a test class that can be used for testing TimeStampUtil class.

        Show
        dilve Ilhyun Suh added a comment - This issue is due to getting 'clockhourOfDay' format instead of 'hourOfDay' format from DateTime value and reorganizing a new DateTime value with 'clockhourOfDay' formatted time value which is not accepted when building DateTime. II have also made a test class that can be used for testing TimeStampUtil class.
        Hide
        dilve Ilhyun Suh added a comment -

        Modified TimeStampUtil
        A new test class created named TestTimeStampUtil

        Show
        dilve Ilhyun Suh added a comment - Modified TimeStampUtil A new test class created named TestTimeStampUtil
        Hide
        dilve Ilhyun Suh added a comment -

        This issue is due to getting 'clockhourOfDay' format instead of 'hourOfDay' format from DateTime value and reorganizing a new DateTime value with 'clockhourOfDay' formatted time value which is not accepted when building DateTime.
        II have also made a test class that can be used for testing TimeStampUtil class.

        Show
        dilve Ilhyun Suh added a comment - This issue is due to getting 'clockhourOfDay' format instead of 'hourOfDay' format from DateTime value and reorganizing a new DateTime value with 'clockhourOfDay' formatted time value which is not accepted when building DateTime. II have also made a test class that can be used for testing TimeStampUtil class.
        Hide
        tajoqa Tajo QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12640825/TAJO-763.patch
        against master revision f8ba4db.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 1 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The applied patch does not increase the total number of javadoc warnings.

        +1 checkstyle. The patch generated 0 code style errors.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in tajo-common.

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/357//testReport/
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/357//console

        This message is automatically generated.

        Show
        tajoqa Tajo QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12640825/TAJO-763.patch against master revision f8ba4db. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 1 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The applied patch does not increase the total number of javadoc warnings. +1 checkstyle. The patch generated 0 code style errors. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in tajo-common. Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/357//testReport/ Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/357//console This message is automatically generated.
        Hide
        hyunsik Hyunsik Choi added a comment -

        +1
        The patch looks good to me. I'll commit it soon.

        Show
        hyunsik Hyunsik Choi added a comment - +1 The patch looks good to me. I'll commit it soon.
        Hide
        hyunsik Hyunsik Choi added a comment -

        committed it to master and branch-0.8.0. Thank you Ilhyun for your contribution.

        Show
        hyunsik Hyunsik Choi added a comment - committed it to master and branch-0.8.0. Thank you Ilhyun for your contribution.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #185 (See https://builds.apache.org/job/Tajo-master-build/185/)
        TAJO-763: Out of range problem in utc_usec_to(). (hyunsik) (hyunsik: rev 92e9a667379b99df1e9160ac207246ac65b0cfac)

        • CHANGES.txt
        • tajo-common/src/test/java/org/apache/tajo/util/TestTimeStampUtil.java
        • tajo-common/src/main/java/org/apache/tajo/util/TimeStampUtil.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #185 (See https://builds.apache.org/job/Tajo-master-build/185/ ) TAJO-763 : Out of range problem in utc_usec_to(). (hyunsik) (hyunsik: rev 92e9a667379b99df1e9160ac207246ac65b0cfac) CHANGES.txt tajo-common/src/test/java/org/apache/tajo/util/TestTimeStampUtil.java tajo-common/src/main/java/org/apache/tajo/util/TimeStampUtil.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-0.8.0-build #80 (See https://builds.apache.org/job/Tajo-0.8.0-build/80/)
        TAJO-763: Out of range problem in utc_usec_to(). (Ilhyun Suh via hyunsik) (hyunsik: rev cce655ab5c6c12a90068e530288bb4ef1a4268b6)

        • tajo-common/src/test/java/org/apache/tajo/util/TestTimeStampUtil.java
        • tajo-common/src/main/java/org/apache/tajo/util/TimeStampUtil.java
        • CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-0.8.0-build #80 (See https://builds.apache.org/job/Tajo-0.8.0-build/80/ ) TAJO-763 : Out of range problem in utc_usec_to(). (Ilhyun Suh via hyunsik) (hyunsik: rev cce655ab5c6c12a90068e530288bb4ef1a4268b6) tajo-common/src/test/java/org/apache/tajo/util/TestTimeStampUtil.java tajo-common/src/main/java/org/apache/tajo/util/TimeStampUtil.java CHANGES.txt
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #186 (See https://builds.apache.org/job/Tajo-master-build/186/)
        TAJO-763: Out of range problem in utc_usec_to() (modified contributor name to Ilhyun Suh in CHANGES.txt). (hyunsik: rev 6a005ce7e4c5ed80278da702255197936c189ff3)

        • CHANGES.txt
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #186 (See https://builds.apache.org/job/Tajo-master-build/186/ ) TAJO-763 : Out of range problem in utc_usec_to() (modified contributor name to Ilhyun Suh in CHANGES.txt). (hyunsik: rev 6a005ce7e4c5ed80278da702255197936c189ff3) CHANGES.txt

          People

          • Assignee:
            dilve Ilhyun Suh
            Reporter:
            jihoonson Jihoon Son
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development