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

Timestamp should be based on unixtime

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: Data Type
    • Labels:
      None

      Description

      The current timestamp type is based on milliseconds. This patch changes timestamp type to be based on unixtime.

      1. TAJO-448.patch
        16 kB
        Hyunsik Choi

        Activity

        Hide
        hyunsik Hyunsik Choi added a comment -

        committed it to master.

        Show
        hyunsik Hyunsik Choi added a comment - committed it to master.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-trunk-postcommit #638 (See https://builds.apache.org/job/Tajo-trunk-postcommit/638/)
        TAJO-448: Timestamp should be based on unixtime. (hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=fce88829d58885197f67c477699b57c632e7246d)

        • tajo-core/tajo-core-storage/src/main/java/org/apache/tajo/storage/RawFile.java
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestDateTimeFunctions.java
        • tajo-common/src/main/java/org/apache/tajo/datum/DatumFactory.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/datetime/ToCharTimestamp.java
        • tajo-common/src/main/java/org/apache/tajo/json/DatumAdapter.java
        • tajo-common/src/test/java/org/apache/tajo/datum/TestTimestampDatum.java
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/eval/TestSQLExpression.java
        • CHANGES.txt
        • tajo-core/tajo-core-storage/src/main/java/org/apache/tajo/storage/RowStoreUtil.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/datetime/ToTimestamp.java
        • tajo-common/src/main/java/org/apache/tajo/datum/TimestampDatum.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-trunk-postcommit #638 (See https://builds.apache.org/job/Tajo-trunk-postcommit/638/ ) TAJO-448 : Timestamp should be based on unixtime. (hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=fce88829d58885197f67c477699b57c632e7246d ) tajo-core/tajo-core-storage/src/main/java/org/apache/tajo/storage/RawFile.java tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestDateTimeFunctions.java tajo-common/src/main/java/org/apache/tajo/datum/DatumFactory.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/datetime/ToCharTimestamp.java tajo-common/src/main/java/org/apache/tajo/json/DatumAdapter.java tajo-common/src/test/java/org/apache/tajo/datum/TestTimestampDatum.java tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/eval/TestSQLExpression.java CHANGES.txt tajo-core/tajo-core-storage/src/main/java/org/apache/tajo/storage/RowStoreUtil.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/datetime/ToTimestamp.java tajo-common/src/main/java/org/apache/tajo/datum/TimestampDatum.java
        Hide
        sirpkt Keuntae Park added a comment -

        Thank you for the kind reply.
        Now, I understand and totally agree with you.

        Show
        sirpkt Keuntae Park added a comment - Thank you for the kind reply. Now, I understand and totally agree with you.
        Hide
        hyunsik Hyunsik Choi added a comment -

        Actually, it works well for CSV file. But, we need more time to think of the fixed binary data format for storing timestamp into some binary format. After the binary format is fixed once, it is hard to change the format.

        Show
        hyunsik Hyunsik Choi added a comment - Actually, it works well for CSV file. But, we need more time to think of the fixed binary data format for storing timestamp into some binary format. After the binary format is fixed once, it is hard to change the format.
        Hide
        sirpkt Keuntae Park added a comment -

        I understand your point.
        Is there any reason that we do not store a timestamp type data?

        Show
        sirpkt Keuntae Park added a comment - I understand your point. Is there any reason that we do not store a timestamp type data?
        Hide
        hyunsik Hyunsik Choi added a comment -

        Even though It is based on unix time, it can optionally has milliseconds ranging from 0 to 999999999. 32 bits and 64bits all are not enough to represent Timestamp's full representation. 64bit log may be a temporal solution. It may be OK because currently we can only use timestamp values during query processing, and we cannot store a data including timestamp type to any file.

        Show
        hyunsik Hyunsik Choi added a comment - Even though It is based on unix time, it can optionally has milliseconds ranging from 0 to 999999999. 32 bits and 64bits all are not enough to represent Timestamp's full representation. 64bit log may be a temporal solution. It may be OK because currently we can only use timestamp values during query processing, and we cannot store a data including timestamp type to any file.
        Hide
        sirpkt Keuntae Park added a comment - - edited

        It looks good to me, too.
        But, are 32 bits enough to represent unix time?
        32 bits unix time only supports up to 2038-01-19 and PostgreSQL looks to support unix time bigger than 32 bits.

        Show
        sirpkt Keuntae Park added a comment - - edited It looks good to me, too. But, are 32 bits enough to represent unix time? 32 bits unix time only supports up to 2038-01-19 and PostgreSQL looks to support unix time bigger than 32 bits.
        Hide
        blrunner Jaehwa Jung added a comment -

        +1.
        It looks good.
        'mvn clean install' finished successfully.

        Show
        blrunner Jaehwa Jung added a comment - +1. It looks good. 'mvn clean install' finished successfully.

          People

          • Assignee:
            hyunsik Hyunsik Choi
            Reporter:
            hyunsik Hyunsik Choi
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development