Repository: incubator-drill Updated Branches: refs/heads/master a8b309a79 -> eeb716006
DRILL-1635: Propagate detailed error information when Drill sees a SQL parser 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/eeb71600 Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/eeb71600 Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/eeb71600 Branch: refs/heads/master Commit: eeb7160064666f43f4c2543792c703dff7acac8d Parents: a8b309a Author: Jinfeng Ni <[email protected]> Authored: Tue Nov 4 18:28:08 2014 -0800 Committer: Jinfeng Ni <[email protected]> Committed: Wed Nov 5 17:10:55 2014 -0800 ---------------------------------------------------------------------- .../main/java/org/apache/drill/exec/work/foreman/Foreman.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/eeb71600/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java index 0163f55..0979f34 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java @@ -63,6 +63,7 @@ import org.apache.drill.exec.util.Pointer; import org.apache.drill.exec.work.ErrorHelper; import org.apache.drill.exec.work.QueryWorkUnit; import org.apache.drill.exec.work.WorkManager.WorkerBee; +import org.eigenbase.sql.parser.SqlParseException; /** * Foreman manages all queries where this is the driving/root node. @@ -383,8 +384,10 @@ public class Foreman implements Runnable, Closeable, Comparable<Object>{ PhysicalPlan plan = sqlWorker.getPlan(sql, textPlan); fragmentManager.getStatus().setPlanText(textPlan.value); runPhysicalPlan(plan); + } catch (SqlParseException ex) { + fail("Failure while parsing sql : " + ex.getMessage(), ex); } catch(Exception e) { - fail("Failure while parsing sql.", e); + fail("Failure while running sql.", e); } }
