Updated Branches:
  refs/heads/master e81ed06f3 -> 3f101aabd

if the query result has errors, fail submission and print the errors. before 
this, the query would simply return 0 rows without indicating an error.


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

Branch: refs/heads/master
Commit: 510711e6426236ee0accb1364707bb66aca3a1f0
Parents: e81ed06
Author: Steven Phillips <[email protected]>
Authored: Mon Sep 2 14:54:56 2013 -0700
Committer: Steven Phillips <[email protected]>
Committed: Tue Sep 3 16:34:21 2013 -0700

----------------------------------------------------------------------
 .../java/org/apache/drill/sql/client/full/BatchListener.java     | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/510711e6/sandbox/prototype/sqlparser/src/main/java/org/apache/drill/sql/client/full/BatchListener.java
----------------------------------------------------------------------
diff --git 
a/sandbox/prototype/sqlparser/src/main/java/org/apache/drill/sql/client/full/BatchListener.java
 
b/sandbox/prototype/sqlparser/src/main/java/org/apache/drill/sql/client/full/BatchListener.java
index 2209b45..d3d7ee5 100644
--- 
a/sandbox/prototype/sqlparser/src/main/java/org/apache/drill/sql/client/full/BatchListener.java
+++ 
b/sandbox/prototype/sqlparser/src/main/java/org/apache/drill/sql/client/full/BatchListener.java
@@ -21,6 +21,7 @@ public class BatchListener implements UserResultsListener {
   public void submissionFailed(RpcException ex) {
     this.ex = ex;
     completed = true;
+    System.out.println("Query failed: " + ex);
   }
 
   @Override
@@ -30,6 +31,9 @@ public class BatchListener implements UserResultsListener {
     if(result.getHeader().getIsLastChunk()){
       completed = true;
     }
+    if (result.getHeader().getErrorCount() > 0) {
+      submissionFailed(new RpcException(String.format("%s", 
result.getHeader().getErrorList())));
+    }
   }
 
   public boolean completed(){

Reply via email to