You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by am...@apache.org on 2016/09/20 01:28:44 UTC

[1/2] drill git commit: DRILL-3898 : Sort spill was modified to catch all errors, ignore repeated errors while closing the new group and issue a more detailed error message.

Repository: drill
Updated Branches:
  refs/heads/master f3c26e34e -> 229571533


DRILL-3898 :  Sort spill was modified to catch all errors, ignore repeated errors while closing the new group and issue a more detailed error message.

close apache/drill#591


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

Branch: refs/heads/master
Commit: 140304d47daf8b18c72a0ab8f39c67d9d8a3031d
Parents: f3c26e3
Author: Boaz Ben-Zvi <bo...@mapr.com>
Authored: Fri Sep 9 16:36:03 2016 -0700
Committer: Aman Sinha <as...@maprtech.com>
Committed: Mon Sep 19 18:18:42 2016 -0700

----------------------------------------------------------------------
 .../drill/exec/physical/impl/xsort/ExternalSortBatch.java     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/140304d4/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
index c88bd4b..54aa72d 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
@@ -592,11 +592,14 @@ public class ExternalSortBatch extends AbstractRecordBatch<ExternalSort> {
       }
       injector.injectChecked(context.getExecutionControls(), INTERRUPTION_WHILE_SPILLING, IOException.class);
       newGroup.closeOutputStream();
-    } catch (Exception e) {
+    } catch (Throwable e) {
       // we only need to cleanup newGroup if spill failed
-      AutoCloseables.close(e, newGroup);
+      try {
+        AutoCloseables.close(e, newGroup);
+      } catch (Throwable t) { /* close() may hit the same IO issue; just ignore */ }
       throw UserException.resourceError(e)
         .message("External Sort encountered an error while spilling to disk")
+              .addContext(e.getMessage() /* more detail */)
         .build(logger);
     } finally {
       hyperBatch.clear();


[2/2] drill git commit: DRILL-4771: Drill should avoid doing the same join twice if count(distinct) exists

Posted by am...@apache.org.
DRILL-4771: Drill should avoid doing the same join twice if count(distinct) exists

close apache/drill#588


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

Branch: refs/heads/master
Commit: 229571533bce1e37395d9675ea804ee97b1a2362
Parents: 140304d
Author: Gautam Parai <gp...@maprtech.com>
Authored: Mon Sep 12 20:21:46 2016 -0700
Committer: Aman Sinha <as...@maprtech.com>
Committed: Mon Sep 19 18:20:56 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/drill/TestBugFixes.java     | 33 ++++++++++++++++++++
 pom.xml                                         |  2 +-
 2 files changed, 34 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/22957153/exec/java-exec/src/test/java/org/apache/drill/TestBugFixes.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestBugFixes.java b/exec/java-exec/src/test/java/org/apache/drill/TestBugFixes.java
index c5062b2..5b736bc 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestBugFixes.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestBugFixes.java
@@ -167,4 +167,37 @@ public class TestBugFixes extends BaseTestQuery {
         .baselineValues("single_top_partition", "nested_partition_1")
         .go();
   }
+
+  @Test
+  public void testDRILL4771() throws Exception {
+    final String query = "select count(*) cnt, avg(distinct emp.department_id) avd\n"
+        + " from cp.`employee.json` emp";
+    final String[] expectedPlans = {
+        ".*Agg\\(group=\\[\\{\\}\\], cnt=\\[\\$SUM0\\(\\$1\\)\\], agg#1=\\[\\$SUM0\\(\\$0\\)\\], agg#2=\\[COUNT\\(\\$0\\)\\]\\)",
+        ".*Agg\\(group=\\[\\{0\\}\\], cnt=\\[COUNT\\(\\)\\]\\)"};
+    final String[] excludedPlans = {".*Join\\(condition=\\[true\\], joinType=\\[inner\\]\\).*"};
+    PlanTestBase.testPlanMatchingPatterns(query, expectedPlans, excludedPlans);
+    testBuilder()
+        .sqlQuery(query)
+        .unOrdered()
+        .baselineColumns("cnt", "avd")
+        .baselineValues(1155L, 10.416666666666666)
+        .build().run();
+
+    final String query1 = "select emp.gender, count(*) cnt, avg(distinct emp.department_id) avd\n"
+            + " from cp.`employee.json` emp\n"
+            + " group by gender";
+    final String[] expectedPlans1 = {
+            ".*Agg\\(group=\\[\\{0\\}\\], agg#0=\\[\\$SUM0\\(\\$2\\)\\], agg#1=\\[\\$SUM0\\(\\$1\\)\\], agg#2=\\[COUNT\\(\\$1\\)\\]\\)",
+            ".*Agg\\(group=\\[\\{0, 1\\}\\], cnt=\\[COUNT\\(\\)\\]\\)"};
+    final String[] excludedPlans1 = {".*Join\\(condition=\\[true\\], joinType=\\[inner\\]\\).*"};
+    PlanTestBase.testPlanMatchingPatterns(query1, expectedPlans1, excludedPlans1);
+    testBuilder()
+            .sqlQuery(query1)
+            .unOrdered()
+            .baselineColumns("gender", "cnt", "avd")
+            .baselineValues("F", 601L, 10.416666666666666)
+            .baselineValues("M", 554L, 11.9)
+            .build().run();
+  }
 }

http://git-wip-us.apache.org/repos/asf/drill/blob/22957153/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index decfcbc..0768720 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1446,7 +1446,7 @@
           <dependency>
             <groupId>org.apache.calcite</groupId>
             <artifactId>calcite-core</artifactId>
-            <version>1.4.0-drill-r17</version>
+            <version>1.4.0-drill-r18</version>
             <exclusions>
               <exclusion>
                 <groupId>org.jgrapht</groupId>