tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hyun...@apache.org
Subject git commit: TAJO-454: pass invalid argument to DateTime constructor in LogicalPlanner. (DaeMyung Kang via hyunsik)
Date Thu, 26 Dec 2013 13:35:12 GMT
Updated Branches:
  refs/heads/master eac2507af -> 7306ba324


TAJO-454: pass invalid argument to DateTime constructor in LogicalPlanner. (DaeMyung Kang
via hyunsik)


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

Branch: refs/heads/master
Commit: 7306ba324a744631a2c9205a8ca260b9fe32fed5
Parents: eac2507
Author: Hyunsik Choi <hyunsik@apache.org>
Authored: Thu Dec 26 22:34:53 2013 +0900
Committer: Hyunsik Choi <hyunsik@apache.org>
Committed: Thu Dec 26 22:34:53 2013 +0900

----------------------------------------------------------------------
 CHANGES.txt                                             |  3 +++
 .../org/apache/tajo/engine/planner/LogicalPlanner.java  | 12 ++++++------
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/7306ba32/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d084bf8..e1c460e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -172,6 +172,9 @@ Release 0.8.0 - unreleased
 
   BUG FIXES
 
+    TAJO-452: pass invalid argument to DateTime constructor in LogicalPlanner.
+    (DaeMyung Kang via hyunsik)
+
     TAJO-451: Update documentation and version constant for Tajo 0.8.
     (hyunsik)
 

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/7306ba32/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/LogicalPlanner.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/LogicalPlanner.java
b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/LogicalPlanner.java
index 11da7b7..55f4290 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/LogicalPlanner.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/LogicalPlanner.java
@@ -1141,10 +1141,10 @@ public class LogicalPlanner extends BaseAlgebraVisitor<LogicalPlanner.PlanContex
                                          timeValue.getSecondsFraction());
 
         TimeDatum datum;
-        if (times[3] == 0) {
-          datum = new TimeDatum(times[0], times[1], times[2]);
-        } else {
+        if (timeValue.hasSecondsFraction()) {
           datum = new TimeDatum(times[0], times[1], times[2], times[3]);
+        } else {
+          datum = new TimeDatum(times[0], times[1], times[2]);
         }
         return new ConstEval(datum);
       }
@@ -1162,10 +1162,10 @@ public class LogicalPlanner extends BaseAlgebraVisitor<LogicalPlanner.PlanContex
                                         timeValue.getSeconds(),
                                         timeValue.getSecondsFraction());
         DateTime dateTime;
-        if (times[3] == 0) {
-          dateTime = new DateTime(dates[0], dates[1], dates[2], times[0], times[1], times[2]);
+        if (timeValue.hasSecondsFraction()) {
+          dateTime = new DateTime(dates[0], dates[1], dates[2], times[0], times[1], times[2],
times[3]);
         } else {
-          dateTime = new DateTime(dates[0], dates[1], dates[2], times[0], times[1], times[3]);
+          dateTime = new DateTime(dates[0], dates[1], dates[2], times[0], times[1], times[2]);
         }
 
         return new ConstEval(new TimestampDatum(dateTime));


Mime
View raw message