Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: Catalog
    • Labels:
      None
    1. TAJO-60.patch
      35 kB
      Hyunsik Choi

      Activity

      Hide
      sirpkt Keuntae Park added a comment - - edited

      Hyunsik Choi I just created the issue(TAJO-414) and uploaded the fix.

      Show
      sirpkt Keuntae Park added a comment - - edited Hyunsik Choi I just created the issue( TAJO-414 ) and uploaded the fix.
      Hide
      hudson Hudson added a comment -

      FAILURE: Integrated in Tajo-trunk-postcommit #612 (See https://builds.apache.org/job/Tajo-trunk-postcommit/612/)
      TAJO-60: Implement Date Datum Type. (hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=2a3173757cd74c91f625853e888314be33b36f56)

      • tajo-common/src/test/java/org/apache/tajo/datum/TestDateDatum.java
      • tajo-common/src/main/java/org/apache/tajo/datum/DatumFactory.java
      • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/statistics/TupleUtil.java
      • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/event/TaskFatalErrorEvent.java
      • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/querymaster/QueryUnitAttempt.java
      • tajo-common/src/main/java/org/apache/tajo/json/TimestampDatumAdapter.java
      • tajo-common/src/main/java/org/apache/tajo/datum/TimestampDatum.java
      • tajo-core/tajo-core-storage/src/main/java/org/apache/tajo/storage/TextSerializeDeserialize.java
      • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/statistics/ColumnStats.java
      • CHANGES.txt
      • tajo-common/src/main/java/org/apache/tajo/json/DateDatumAdapter.java
      • tajo-core/tajo-core-storage/src/main/java/org/apache/tajo/storage/RowStoreUtil.java
      • tajo-common/src/main/java/org/apache/tajo/json/CommonGsonHelper.java
      • tajo-common/src/test/java/org/apache/tajo/datum/TestTimestampDatum.java
      • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/querymaster/Query.java
      • tajo-common/src/main/java/org/apache/tajo/datum/DateDatum.java
      Show
      hudson Hudson added a comment - FAILURE: Integrated in Tajo-trunk-postcommit #612 (See https://builds.apache.org/job/Tajo-trunk-postcommit/612/ ) TAJO-60 : Implement Date Datum Type. (hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=2a3173757cd74c91f625853e888314be33b36f56 ) tajo-common/src/test/java/org/apache/tajo/datum/TestDateDatum.java tajo-common/src/main/java/org/apache/tajo/datum/DatumFactory.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/statistics/TupleUtil.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/event/TaskFatalErrorEvent.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/querymaster/QueryUnitAttempt.java tajo-common/src/main/java/org/apache/tajo/json/TimestampDatumAdapter.java tajo-common/src/main/java/org/apache/tajo/datum/TimestampDatum.java tajo-core/tajo-core-storage/src/main/java/org/apache/tajo/storage/TextSerializeDeserialize.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/statistics/ColumnStats.java CHANGES.txt tajo-common/src/main/java/org/apache/tajo/json/DateDatumAdapter.java tajo-core/tajo-core-storage/src/main/java/org/apache/tajo/storage/RowStoreUtil.java tajo-common/src/main/java/org/apache/tajo/json/CommonGsonHelper.java tajo-common/src/test/java/org/apache/tajo/datum/TestTimestampDatum.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/querymaster/Query.java tajo-common/src/main/java/org/apache/tajo/datum/DateDatum.java
      Hide
      hyunsik Hyunsik Choi added a comment -

      You are right. That was a mistake. Could you please create a jira issue for this fix?

      Show
      hyunsik Hyunsik Choi added a comment - You are right. That was a mistake. Could you please create a jira issue for this fix?
      Hide
      sirpkt Keuntae Park added a comment - - edited

      Hyunsik Choi I have a question just for curiosity
      Is there any reason that decode() method has following bit operations ?

        private static LocalDate decode(int val) {
          int year = (val >> 16);
          int monthOfYear = (0x0FFF & val) >> 8;
          int dayOfMonth = (0xF0FF & val);
          return new LocalDate(year, monthOfYear, dayOfMonth);
        }
      

      Because I think following code is more literal interpretation of date type (year: 2bytes, month: 1byte, day: 1byte)

          int monthOfYear = (0xFFFF & val) >> 8;
          int dayOfMonth = (0x00FF & val);
      

      Of course, I know both have the same results as month value should be between 1 and 12, which is smaller than 0xF.

      Show
      sirpkt Keuntae Park added a comment - - edited Hyunsik Choi I have a question just for curiosity Is there any reason that decode() method has following bit operations ? private static LocalDate decode(int val) { int year = (val >> 16); int monthOfYear = (0x0FFF & val) >> 8; int dayOfMonth = (0xF0FF & val); return new LocalDate(year, monthOfYear, dayOfMonth); } Because I think following code is more literal interpretation of date type (year: 2bytes, month: 1byte, day: 1byte) int monthOfYear = (0xFFFF & val) >> 8; int dayOfMonth = (0x00FF & val); Of course, I know both have the same results as month value should be between 1 and 12, which is smaller than 0xF.
      Hide
      hyunsik Hyunsik Choi added a comment -

      committed this patch to master. Thanks for the review.

      Show
      hyunsik Hyunsik Choi added a comment - committed this patch to master. Thanks for the review.
      Hide
      blrunner Jaehwa Jung added a comment -

      +1.

      Nice job.
      The patch looks good.
      I've verified 'mvn clean install'

      Ship it now.

      Show
      blrunner Jaehwa Jung added a comment - +1. Nice job. The patch looks good. I've verified 'mvn clean install' Ship it now.
      Hide
      charsyam DaeMyung Kang added a comment -

      good job.
      The patch looks good for me.
      "mvn clean install" works well.

      Show
      charsyam DaeMyung Kang added a comment - good job. The patch looks good for me. "mvn clean install" works well.
      Hide
      hyunsik Hyunsik Choi added a comment -

      I attached the patch for date datum. This patch does a bit of clean up and refactorings of DatumFactory.

      Show
      hyunsik Hyunsik Choi added a comment - I attached the patch for date datum. This patch does a bit of clean up and refactorings of DatumFactory.

        People

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

          Dates

          • Created:
            Updated:
            Resolved:

            Development