Repository: hive Updated Branches: refs/heads/master 8138eaa20 -> 355d6b148
HIVE-15629: Set DDLTaskâs exception with its subtaskâs exception (Zhihai Xu via Jimmy Xiang) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/355d6b14 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/355d6b14 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/355d6b14 Branch: refs/heads/master Commit: 355d6b14894f77b93499044f020d3630ff02216b Parents: 8138eaa Author: Zhihai Xu <zhihaixu2...@gmail.com> Authored: Thu Jan 19 09:38:08 2017 -0800 Committer: Jimmy Xiang <jxi...@apache.org> Committed: Thu Jan 19 09:38:08 2017 -0800 ---------------------------------------------------------------------- ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/355d6b14/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java index a1fb874..fc156c7 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java @@ -697,6 +697,9 @@ public class DDLTask extends Task<DDLWork> implements Serializable { task.initialize(queryState, getQueryPlan(), driverCxt, opContext); subtask = task; int ret = task.execute(driverCxt); + if (subtask.getException() != null) { + setException(subtask.getException()); + } return ret; } @@ -4435,7 +4438,11 @@ public class DDLTask extends Task<DDLWork> implements Serializable { taskExec.setWork(truncateWork); taskExec.setQueryPlan(this.getQueryPlan()); subtask = taskExec; - return taskExec.execute(driverCxt); + int ret = taskExec.execute(driverCxt); + if (subtask.getException() != null) { + setException(subtask.getException()); + } + return ret; } String tableName = truncateTableDesc.getTableName();