tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jihoon...@apache.org
Subject git commit: TAJO-414: Fix bug of bit operations in decode() method of DateDatum class. (Keuntae Park via jihoon)
Date Fri, 13 Dec 2013 05:41:16 GMT
Updated Branches:
  refs/heads/master 3c302d9e2 -> fe7515d66


TAJO-414: Fix bug of bit operations in decode() method of DateDatum class. (Keuntae Park via
jihoon)


Project: http://git-wip-us.apache.org/repos/asf/incubator-tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tajo/commit/fe7515d6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tajo/tree/fe7515d6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tajo/diff/fe7515d6

Branch: refs/heads/master
Commit: fe7515d66a2ec3ef4fe0e33cb050e93f7e93631f
Parents: 3c302d9
Author: Jihoon Son <jihoonson@apache.org>
Authored: Fri Dec 13 14:40:38 2013 +0900
Committer: Jihoon Son <jihoonson@apache.org>
Committed: Fri Dec 13 14:40:38 2013 +0900

----------------------------------------------------------------------
 CHANGES.txt                                                    | 2 ++
 tajo-common/src/main/java/org/apache/tajo/datum/DateDatum.java | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/fe7515d6/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 0690b63..46bf1ce 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -142,6 +142,8 @@ Release 0.8.0 - unreleased
 
   BUG FIXES
 
+    TAJO-414: Fix bug of bit operations in decode() method of DateDatum class. (Keuntae Park
via jihoon)
+
     TAJO-407: PostgreSQL-style cast should be higher operator priority. (hyunsik)
 
     TAJO-411: Fix Bug: createFromInt8's DATE type should be TIMESTAMP. (DaeMyung Kang via
jihoon)

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/fe7515d6/tajo-common/src/main/java/org/apache/tajo/datum/DateDatum.java
----------------------------------------------------------------------
diff --git a/tajo-common/src/main/java/org/apache/tajo/datum/DateDatum.java b/tajo-common/src/main/java/org/apache/tajo/datum/DateDatum.java
index 4dac59e..9998c72 100644
--- a/tajo-common/src/main/java/org/apache/tajo/datum/DateDatum.java
+++ b/tajo-common/src/main/java/org/apache/tajo/datum/DateDatum.java
@@ -74,8 +74,8 @@ public class DateDatum extends Datum {
 
   private static LocalDate decode(int val) {
     int year = (val >> 16);
-    int monthOfYear = (0x0FFF & val) >> 8;
-    int dayOfMonth = (0xF0FF & val);
+    int monthOfYear = (0xFFFF & val) >> 8;
+    int dayOfMonth = (0x00FF & val);
     return new LocalDate(year, monthOfYear, dayOfMonth);
   }
 


Mime
View raw message