You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by me...@apache.org on 2014/12/18 05:38:14 UTC
[3/5] drill git commit: DRILL-1883: Fix output type of date,
interval arithmetic functions
DRILL-1883: Fix output type of date, interval arithmetic functions
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/a1621911
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/a1621911
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/a1621911
Branch: refs/heads/master
Commit: a16219110055a32b068ac51c9fe9548aea825bc5
Parents: 4f27b09
Author: Mehant Baid <me...@gmail.com>
Authored: Thu Dec 4 14:39:33 2014 -0800
Committer: Mehant Baid <me...@gmail.com>
Committed: Wed Dec 17 18:52:20 2014 -0800
----------------------------------------------------------------------
.../DateIntervalArithmeticFunctions.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/a1621911/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateIntervalArithmeticFunctions.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateIntervalArithmeticFunctions.java b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateIntervalArithmeticFunctions.java
index 349b7bf..0b0da52 100644
--- a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateIntervalArithmeticFunctions.java
+++ b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateIntervalArithmeticFunctions.java
@@ -115,8 +115,11 @@ public class ${datetype}${intervaltype}Functions {
@Param ${intervaltype}Holder right;
@Param ${datetype}Holder left;
@Workspace org.joda.time.MutableDateTime temp;
+ <#if datetype == "Date" && (intervaltype.startsWith("Interval"))>
+ @Output TimeStampHolder out;
+ <#else>
@Output ${datetype}Holder out;
-
+ </#if>
public void setup(RecordBatch incoming) {
<#if datetype == "TimeStampTZ">
temp = new org.joda.time.MutableDateTime(org.joda.time.DateTimeZone.forID(org.apache.drill.exec.expr.fn.impl.DateUtility.timezoneList[left.index]));