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 2015/01/20 21:07:31 UTC

[1/2] drill git commit: DRILL-2043: Fix testStarPartitionFilterOrderBy to be timezone insensitive

Repository: drill
Updated Branches:
  refs/heads/master 2fc9d0471 -> 8103099e0


DRILL-2043: Fix testStarPartitionFilterOrderBy to be timezone insensitive


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

Branch: refs/heads/master
Commit: 8103099e02fea0a93788155c1f7e95532b9d82f2
Parents: 7b05d08
Author: Mehant Baid <me...@gmail.com>
Authored: Tue Jan 20 10:37:14 2015 -0800
Committer: Mehant Baid <me...@gmail.com>
Committed: Tue Jan 20 11:44:37 2015 -0800

----------------------------------------------------------------------
 exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/8103099e/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java b/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java
index 3bbe2b5..3d7c31e 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java
@@ -313,7 +313,7 @@ public class TestStarQueries extends BaseTestQuery{
   @Test // DRILL-1500
   public void testStarPartitionFilterOrderBy() throws Exception {
     String query = String.format("select * from dfs_test.`%s/multilevel/parquet` where dir0=1994 and dir1='Q1' order by dir0 limit 1", TEST_RES_PATH);
-    org.joda.time.DateTime mydate = new org.joda.time.DateTime("1994-01-20T00:00:00.000-08:00");
+    org.joda.time.DateTime mydate = new org.joda.time.DateTime("1994-01-20T00:00:00.000");
 
     testBuilder()
     .sqlQuery(query)


[2/2] drill git commit: DRILL-1945: Fix initialization variables for max aggregate function.

Posted by me...@apache.org.
DRILL-1945: Fix initialization variables for max aggregate function.


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

Branch: refs/heads/master
Commit: 7b05d080c29022c3d04aba2b721f04f7a9a7f3fc
Parents: 2fc9d04
Author: Mehant Baid <me...@gmail.com>
Authored: Mon Jan 19 17:42:04 2015 -0800
Committer: Mehant Baid <me...@gmail.com>
Committed: Tue Jan 20 11:44:37 2015 -0800

----------------------------------------------------------------------
 .../src/main/codegen/templates/AggrTypeFunctions1.java    |  8 ++++----
 .../apache/drill/exec/fn/impl/TestAggregateFunctions.java | 10 ++++++++++
 2 files changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/7b05d080/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions1.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions1.java b/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions1.java
index e19def3..e4386b2 100644
--- a/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions1.java
+++ b/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions1.java
@@ -88,9 +88,9 @@ public static class ${type.inputType}${aggrtype.className} implements DrillAggFu
 	  <#elseif type.runningType?starts_with("BigInt")>
 	    value.value = Long.MIN_VALUE;
 	  <#elseif type.runningType?starts_with("Float4")>
-		value.value = Float.MIN_VALUE;
+		value.value = -Float.MAX_VALUE;
 	  <#elseif type.runningType?starts_with("Float8")>
-		value.value = Double.MIN_VALUE;	    
+		value.value = -Double.MAX_VALUE;
 	  </#if>
 	</#if>
 	  
@@ -163,9 +163,9 @@ public static class ${type.inputType}${aggrtype.className} implements DrillAggFu
 	  <#elseif type.runningType?starts_with("BigInt")>
 	    value.value = Long.MIN_VALUE;
 	  <#elseif type.runningType?starts_with("Float4")>
-		value.value = Float.MIN_VALUE;
+		value.value = -Float.MAX_VALUE;
 	  <#elseif type.runningType?starts_with("Float8")>
-		value.value = Double.MIN_VALUE;	    
+		value.value = -Double.MAX_VALUE;
 	  </#if>
 	</#if>
 	  

http://git-wip-us.apache.org/repos/asf/drill/blob/7b05d080/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestAggregateFunctions.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestAggregateFunctions.java b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestAggregateFunctions.java
index c5cc4f7..2b3ff50 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestAggregateFunctions.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestAggregateFunctions.java
@@ -46,4 +46,14 @@ public class TestAggregateFunctions extends BaseTestQuery {
         .baselineValues(2l)
         .build().run();
   }
+
+  @Test
+  public void testMaxWithZeroInput() throws Exception {
+    testBuilder()
+        .sqlQuery("select max(employee_id * 0.0) as max_val from cp.`employee.json`")
+        .unOrdered()
+        .baselineColumns("max_val")
+        .baselineValues(0.0d)
+        .go();
+  }
 }