drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [15/27] git commit: Fix regression caused by DRILL-1126
Date Sun, 27 Jul 2014 18:47:01 GMT
Fix regression caused by DRILL-1126


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

Branch: refs/heads/master
Commit: dab9629ae58c7e5e0cf56d76477e0afdb1c2f371
Parents: 4ac898c
Author: Mehant Baid <mehantr@gmail.com>
Authored: Thu Jul 24 10:36:10 2014 -0700
Committer: Jacques Nadeau <jacques@apache.org>
Committed: Fri Jul 25 14:33:47 2014 -0700

----------------------------------------------------------------------
 .../codegen/templates/Decimal/DecimalAggrTypeFunctions1.java    | 5 +++++
 .../codegen/templates/Decimal/DecimalAggrTypeFunctions2.java    | 4 ++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/dab9629a/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions1.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions1.java
b/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions1.java
index e55362f..8b4bd8a 100644
--- a/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions1.java
+++ b/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions1.java
@@ -94,7 +94,9 @@ public static class ${type.inputType}${aggrtype.className} implements DrillAggFu
     value.value = ${type.initValue};
     </#if>
   <#elseif aggrtype.funcName == "sum">
+    value = new ObjectHolder();
     value.obj = java.math.BigDecimal.ZERO;
+    outputScale = new IntHolder();
     outputScale.value = Integer.MIN_VALUE;
 	</#if>
 
@@ -223,7 +225,10 @@ public static class ${type.inputType}${aggrtype.className} implements
DrillAggFu
     value.value = ${type.initValue};
     </#if>
   <#elseif aggrtype.funcName == "sum">
+    value = new ObjectHolder();
     value.obj = java.math.BigDecimal.ZERO;
+    outputScale = new IntHolder();
+    outputScale.value = Integer.MIN_VALUE;
 	</#if>
 
   }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/dab9629a/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions2.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions2.java
b/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions2.java
index 0ddff6c..b3f468b 100644
--- a/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions2.java
+++ b/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions2.java
@@ -61,9 +61,11 @@ public static class ${type.inputType}${aggrtype.className} implements DrillAggFu
   @Output ${type.outputType}Holder out;
 
   public void setup(RecordBatch b) {
+    value = new ObjectHolder();
     value.obj = java.math.BigDecimal.ZERO;
     count = new ${type.countRunningType}Holder();
     count.value = 0;
+    outputScale = new IntHolder();
     outputScale.value = Integer.MIN_VALUE;
   }
 
@@ -105,9 +107,11 @@ public static class ${type.inputType}${aggrtype.className} implements
DrillAggFu
 
   @Override
   public void reset() {
+    value = new ObjectHolder();
     value.obj = java.math.BigDecimal.ZERO;
     count = new ${type.countRunningType}Holder();
     count.value = 0;
+    outputScale = new IntHolder();
     outputScale.value = Integer.MIN_VALUE;
   }
 }


Mime
View raw message