You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by mu...@apache.org on 2021/02/03 17:12:06 UTC

[hive] branch master updated: HIVE-24673: Migrate NegativeCliDriver and NegativeMinimrCliDriver to llap (Mustafa Iman, reviewed by Zoltan Haindrich)

This is an automated email from the ASF dual-hosted git repository.

mustafaiman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 0264c11  HIVE-24673: Migrate NegativeCliDriver and NegativeMinimrCliDriver to llap (Mustafa Iman, reviewed by Zoltan Haindrich)
0264c11 is described below

commit 0264c11fabf6ca14076b87a328d9029231d53316
Author: Mustafa Iman <mu...@gmail.com>
AuthorDate: Tue Jan 19 20:09:56 2021 -0800

    HIVE-24673: Migrate NegativeCliDriver and NegativeMinimrCliDriver to llap (Mustafa Iman, reviewed by Zoltan Haindrich)
    
    Rename TestNegativeCliDriver and TestNegativeMinimrCliDriver to TestNegativeLlapCliDriver and TestNegativeLlapLocalCliDriver respectively. Former drivers ran on mapreduce which is unsupported. There were no negative driver to verify failures on Tez. So we could not verify tests that were expected to fail in runtime.
    Removed masking of Caused by lines. So we can assert actual exceptions rather than generic failure messages only.
    Deleted tests for mapjoin hints. Hints are not supported anymore.
    Moved insert_into5.q and insert_into6.q to non local driver. That is because they depend on local filesystem being case-sensitive. On macos and windows local filesystem is case-insensitive. Developers could get confused about these failing on their computer.
    
    Change-Id: I4c0aa1bacd59f9bf0a818683a295f56ba4b3c37b
---
 ...iDriver.java => TestNegativeLlapCliDriver.java} |   6 +-
 ...er.java => TestNegativeLlapLocalCliDriver.java} |   6 +-
 .../test/resources/testconfiguration.properties    |  10 +-
 .../apache/hadoop/hive/cli/control/CliConfigs.java |  20 +-
 .../org/apache/hadoop/hive/ql/QOutProcessor.java   |  10 +-
 .../{minimr_broken_pipe.q => broken_pipe.q}        |   1 +
 .../clientnegative/bucket_mapjoin_mismatch1.q      |  46 ----
 .../bucket_mapjoin_wrong_table_metadata_1.q        |  22 --
 .../bucket_mapjoin_wrong_table_metadata_2.q        |  27 ---
 .../queries/clientnegative/cachingprintstream.q    |   1 +
 ql/src/test/queries/clientnegative/ct_noperm_loc.q |   4 +
 ql/src/test/queries/clientnegative/dyn_part3.q     |   4 +-
 .../queries/clientnegative/dyn_part_max_per_node.q |   5 +
 .../fallbackauth_disallow_transform.q              |   1 +
 ql/src/test/queries/clientnegative/insert_into1.q  |   1 +
 ql/src/test/queries/clientnegative/insert_into2.q  |   1 +
 ql/src/test/queries/clientnegative/insert_into3.q  |   1 +
 ql/src/test/queries/clientnegative/insert_into4.q  |   1 +
 .../test/queries/clientnegative/invalid_mapjoin1.q |   3 -
 ql/src/test/queries/clientnegative/join2.q         |   8 -
 ql/src/test/queries/clientnegative/join28.q        |  18 --
 ql/src/test/queries/clientnegative/join29.q        |  12 -
 ql/src/test/queries/clientnegative/join32.q        |  21 --
 ql/src/test/queries/clientnegative/join35.q        |  20 --
 .../clientnegative/local_mapred_error_cache.q      |   5 -
 ql/src/test/queries/clientnegative/lockneg1.q      |   1 +
 ql/src/test/queries/clientnegative/lockneg2.q      |   1 +
 ql/src/test/queries/clientnegative/lockneg3.q      |   1 +
 ql/src/test/queries/clientnegative/lockneg4.q      |   1 +
 ql/src/test/queries/clientnegative/lockneg5.q      |   1 +
 .../lockneg_query_tbl_in_locked_db.q               |   1 +
 .../clientnegative/lockneg_try_db_lock_conflict.q  |   1 +
 .../clientnegative/lockneg_try_drop_locked_db.q    |   1 +
 .../clientnegative/lockneg_try_lock_db_in_use.q    |   1 +
 .../clientnegative/mapreduce_stack_trace_turnoff.q |  15 --
 ql/src/test/queries/clientnegative/msck_repair_1.q |   2 +-
 ql/src/test/queries/clientnegative/msck_repair_2.q |   4 +-
 ql/src/test/queries/clientnegative/msck_repair_3.q |   6 +-
 ql/src/test/queries/clientnegative/msck_repair_4.q |   4 +-
 ql/src/test/queries/clientnegative/msck_repair_5.q |   6 +-
 ql/src/test/queries/clientnegative/msck_repair_6.q |   4 +-
 .../queries/clientnegative/script_broken_pipe2.q   |   1 +
 .../queries/clientnegative/script_broken_pipe3.q   |   3 +-
 ql/src/test/queries/clientnegative/script_error.q  |   1 +
 .../queries/clientnegative/smb_bucketmapjoin.q     |  24 --
 .../test/queries/clientnegative/smb_mapjoin_14.q   |  39 ----
 .../clientnegative/sortmerge_mapjoin_mismatch_1.q  |  28 ---
 .../{mapreduce_stack_trace.q => stack_trace.q}     |   0
 .../subquery_scalar_corr_multi_rows.q              |   3 +
 .../clientnegative/subquery_scalar_multi_rows.q    |   3 +
 .../queries/clientnegative/udf_test_error_reduce.q |   2 +-
 ql/src/test/queries/clientnegative/union22.q       |  28 ---
 .../clientnegative/avro_non_nullable_union.q.out   |  36 ++-
 .../results/clientnegative/bad_exec_hooks.q.out    |   2 +
 .../test/results/clientnegative/broken_pipe.q.out  |  33 +++
 .../clientnegative/bucket_mapjoin_mismatch1.q.out  | 253 ---------------------
 .../bucket_mapjoin_wrong_table_metadata_1.q.out    |  53 -----
 .../bucket_mapjoin_wrong_table_metadata_2.q.out    |  71 ------
 .../clientnegative/cachingprintstream.q.out        |  80 ++++++-
 .../check_constraint_tbl_level.q.out               |  21 +-
 .../check_constraint_violation.q.out               |  21 +-
 .../clientnegative/cluster_tasklog_retrieval.q.out |   8 +-
 .../compute_bit_vector_fm_limit.q.out              |  38 +++-
 .../clientnegative/compute_stats_long.q.out        |  38 +++-
 ql/src/test/results/clientnegative/dyn_part3.q.out |  36 ++-
 .../clientnegative/dyn_part_max_per_node.q.out     |  36 ++-
 .../dynamic_partitions_with_whitelist.q.out        |  29 ++-
 .../results/clientnegative/invalid_mapjoin1.q.out  |   1 -
 ql/src/test/results/clientnegative/join2.q.out     |   1 -
 ql/src/test/results/clientnegative/join28.q.out    |   9 -
 ql/src/test/results/clientnegative/join29.q.out    |   9 -
 ql/src/test/results/clientnegative/join32.q.out    |   9 -
 ql/src/test/results/clientnegative/join35.q.out    |   9 -
 .../clientnegative/local_mapred_error_cache.q.out  |   6 -
 .../clientnegative/mapreduce_stack_trace.q.out     |   6 -
 .../mapreduce_stack_trace_turnoff.q.out            |   6 -
 .../test/results/clientnegative/masking_mv.q.out   | 159 ++++++-------
 ...terialized_view_no_supported_op_rewrite_2.q.out |   2 +-
 .../clientnegative/merge_constraint_notnull.q.out  |  25 +-
 .../clientnegative/minimr_broken_pipe.q.out        |   6 -
 .../clientnegative/script_broken_pipe2.q.out       |  45 +++-
 .../clientnegative/script_broken_pipe3.q.out       |  31 ++-
 .../test/results/clientnegative/script_error.q.out |  76 +++++--
 .../test/results/clientnegative/serde_regex2.q.out |  46 +++-
 .../results/clientnegative/smb_bucketmapjoin.q.out |  41 ----
 .../results/clientnegative/smb_mapjoin_14.q.out    |  41 ----
 .../sortmerge_mapjoin_mismatch_1.q.out             | 118 ----------
 .../clientnegative/split_sample_out_of_range.q.out |   2 +-
 .../test/results/clientnegative/stack_trace.q.out  |  56 +++++
 .../clientnegative/stats_aggregator_error_2.q.out  |  29 ++-
 .../clientnegative/stats_publisher_error_1.q.out   |  29 ++-
 .../clientnegative/stats_publisher_error_2.q.out   |  29 ++-
 .../clientnegative/subquery_corr_in_agg.q.out      |  38 +++-
 .../clientnegative/subquery_in_implicit_gby.q.out  |  38 +++-
 .../subquery_notin_implicit_gby.q.out              |  39 +++-
 .../subquery_scalar_corr_multi_rows.q.out          |  39 +++-
 .../subquery_scalar_multi_rows.q.out               |  51 ++++-
 .../results/clientnegative/udf_assert_true.q.out   | 156 +++++--------
 .../results/clientnegative/udf_assert_true2.q.out  |  81 +++----
 .../results/clientnegative/udf_reflect_neg.q.out   |  13 +-
 .../results/clientnegative/udf_test_error.q.out    |   6 +-
 .../clientnegative/udf_test_error_reduce.q.out     |   6 +-
 ql/src/test/results/clientnegative/union22.q.out   |  47 ----
 .../clientpositive/llap/retry_failure.q.out        |  56 +++++
 .../clientpositive/llap/retry_failure_oom.q.out    |   8 +
 .../llap/retry_failure_reorder.q.out               |   8 +
 .../llap/retry_failure_stat_changes.q.out          |   8 +
 .../clientpositive/llap/vector_retry_failure.q.out |  16 ++
 108 files changed, 1247 insertions(+), 1345 deletions(-)

diff --git a/itests/qtest/src/test/java/org/apache/hadoop/hive/cli/TestNegativeCliDriver.java b/itests/qtest/src/test/java/org/apache/hadoop/hive/cli/TestNegativeLlapCliDriver.java
similarity index 90%
rename from itests/qtest/src/test/java/org/apache/hadoop/hive/cli/TestNegativeCliDriver.java
rename to itests/qtest/src/test/java/org/apache/hadoop/hive/cli/TestNegativeLlapCliDriver.java
index a1de3d9..184d526 100644
--- a/itests/qtest/src/test/java/org/apache/hadoop/hive/cli/TestNegativeCliDriver.java
+++ b/itests/qtest/src/test/java/org/apache/hadoop/hive/cli/TestNegativeLlapCliDriver.java
@@ -31,9 +31,9 @@ import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
 
 @RunWith(Parameterized.class)
-public class TestNegativeCliDriver {
+public class TestNegativeLlapCliDriver {
 
-  static CliAdapter adapter = new CliConfigs.NegativeCliConfig().getCliAdapter();
+  static CliAdapter adapter = new CliConfigs.NegativeLlapCliDriver().getCliAdapter();
 
   @Parameters(name = "{0}")
   public static List<Object[]> getParameters() throws Exception {
@@ -49,7 +49,7 @@ public class TestNegativeCliDriver {
   private String name;
   private File qfile;
 
-  public TestNegativeCliDriver(String name, File qfile) {
+  public TestNegativeLlapCliDriver(String name, File qfile) {
     this.name = name;
     this.qfile = qfile;
   }
diff --git a/itests/qtest/src/test/java/org/apache/hadoop/hive/cli/TestNegativeMinimrCliDriver.java b/itests/qtest/src/test/java/org/apache/hadoop/hive/cli/TestNegativeLlapLocalCliDriver.java
similarity index 89%
rename from itests/qtest/src/test/java/org/apache/hadoop/hive/cli/TestNegativeMinimrCliDriver.java
rename to itests/qtest/src/test/java/org/apache/hadoop/hive/cli/TestNegativeLlapLocalCliDriver.java
index ff3ad9f..0e21f15 100644
--- a/itests/qtest/src/test/java/org/apache/hadoop/hive/cli/TestNegativeMinimrCliDriver.java
+++ b/itests/qtest/src/test/java/org/apache/hadoop/hive/cli/TestNegativeLlapLocalCliDriver.java
@@ -31,9 +31,9 @@ import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
 
 @RunWith(Parameterized.class)
-public class TestNegativeMinimrCliDriver {
+public class TestNegativeLlapLocalCliDriver {
 
-  static CliAdapter adapter = new CliConfigs.NegativeMinimrCli().getCliAdapter();
+  static CliAdapter adapter = new CliConfigs.NegativeLlapLocalCliConfig().getCliAdapter();
 
   @Parameters(name = "{0}")
   public static List<Object[]> getParameters() throws Exception {
@@ -49,7 +49,7 @@ public class TestNegativeMinimrCliDriver {
   private String name;
   private File qfile;
 
-  public TestNegativeMinimrCliDriver(String name, File qfile) {
+  public TestNegativeLlapLocalCliDriver(String name, File qfile) {
     this.name = name;
     this.qfile = qfile;
   }
diff --git a/itests/src/test/resources/testconfiguration.properties b/itests/src/test/resources/testconfiguration.properties
index 3b239c9..e433185 100644
--- a/itests/src/test/resources/testconfiguration.properties
+++ b/itests/src/test/resources/testconfiguration.properties
@@ -332,15 +332,15 @@ beeline.positive.include=\
   smb_mapjoin_7.q,\
   udf_unix_timestamp.q
 
-minimr.query.negative.files=\
+llap.query.negative.files=\
+  broken_pipe.q,\
   cluster_tasklog_retrieval.q,\
   ct_noperm_loc.q,\
   ctas_noperm_loc.q,\
   file_with_header_footer_negative.q,\
-  local_mapred_error_cache.q,\
-  mapreduce_stack_trace.q,\
-  mapreduce_stack_trace_turnoff.q,\
-  minimr_broken_pipe.q,\
+  msck_repair_5.q,\
+  msck_repair_6.q,\
+  stack_trace.q,\
   table_nonprintable_negative.q,\
   udf_local_resource.q
 
diff --git a/itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java b/itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java
index dbde40d..c242bd4 100644
--- a/itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java
+++ b/itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java
@@ -348,13 +348,13 @@ public class CliConfigs {
     }
   }
 
-  public static class NegativeCliConfig extends AbstractCliConfig {
-    public NegativeCliConfig() {
+  public static class NegativeLlapLocalCliConfig extends AbstractCliConfig {
+    public NegativeLlapLocalCliConfig() {
       super(CoreNegativeCliDriver.class);
       try {
         setQueryDir("ql/src/test/queries/clientnegative");
 
-        excludesFrom(testConfigProps, "minimr.query.negative.files");
+        excludesFrom(testConfigProps, "llap.query.negative.files");
         excludesFrom(testConfigProps, "spark.only.query.negative.files");
 
         setResultsDir("ql/src/test/results/clientnegative");
@@ -363,21 +363,21 @@ public class CliConfigs {
         setInitScript("q_test_init.sql");
         setCleanupScript("q_test_cleanup.sql");
 
-        setHiveConfDir("");
-        setClusterType(MiniClusterType.NONE);
+        setHiveConfDir("data/conf/llap");
+        setClusterType(MiniClusterType.LLAP_LOCAL);
       } catch (Exception e) {
         throw new RuntimeException("can't construct cliconfig", e);
       }
     }
   }
 
-  public static class NegativeMinimrCli extends AbstractCliConfig {
-    public NegativeMinimrCli() {
+  public static class NegativeLlapCliDriver extends AbstractCliConfig {
+    public NegativeLlapCliDriver() {
       super(CoreNegativeCliDriver.class);
       try {
         setQueryDir("ql/src/test/queries/clientnegative");
 
-        includesFrom(testConfigProps, "minimr.query.negative.files");
+        includesFrom(testConfigProps, "llap.query.negative.files");
 
         setResultsDir("ql/src/test/results/clientnegative");
         setLogDir("itests/qtest/target/qfile-results/clientnegative");
@@ -385,8 +385,8 @@ public class CliConfigs {
         setInitScript("q_test_init_src.sql");
         setCleanupScript("q_test_cleanup_src.sql");
 
-        setHiveConfDir("");
-        setClusterType(MiniClusterType.MR);
+        setHiveConfDir("data/conf/llap");
+        setClusterType(MiniClusterType.LLAP);
       } catch (Exception e) {
         throw new RuntimeException("can't construct cliconfig", e);
       }
diff --git a/itests/util/src/main/java/org/apache/hadoop/hive/ql/QOutProcessor.java b/itests/util/src/main/java/org/apache/hadoop/hive/ql/QOutProcessor.java
index 879a204..840276e 100644
--- a/itests/util/src/main/java/org/apache/hadoop/hive/ql/QOutProcessor.java
+++ b/itests/util/src/main/java/org/apache/hadoop/hive/ql/QOutProcessor.java
@@ -130,7 +130,6 @@ public class QOutProcessor {
       "at sun",
       "at java",
       "at junit",
-      "Caused by:",
       "LOCK_QUERYID:",
       "LOCK_TIME:",
       "grantTime",
@@ -142,7 +141,8 @@ public class QOutProcessor {
       "hive-staging",
       "at com.sun.proxy",
       "at com.jolbox",
-      "at com.zaxxer"
+      "at com.zaxxer",
+      "at com.google"
   };
 
   // Using String.contains instead of pattern, as it is much faster
@@ -337,6 +337,12 @@ public class QOutProcessor {
     ppm.add(new PatternReplacementPair(Pattern.compile("rowcount = [0-9]+(\\.[0-9]+(E[0-9]+)?)?, cumulative cost = \\{.*\\}, id = [0-9]*"),
         "rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked###"));
 
+    // When a vertex is killed due to failure of upstream vertex, logs are in arbitrary order.
+    // We do not want the test to fail because of this.
+    ppm.add(new PatternReplacementPair(
+        Pattern.compile("Vertex killed, vertexName=(.*?),.*\\[\\1\\] killed\\/failed due to:OTHER_VERTEX_FAILURE\\]"),
+        "[Masked Vertex killed due to OTHER_VERTEX_FAILURE]"));
+
     partialPlanMask = ppm.toArray(new PatternReplacementPair[ppm.size()]);
   }
 
diff --git a/ql/src/test/queries/clientnegative/minimr_broken_pipe.q b/ql/src/test/queries/clientnegative/broken_pipe.q
similarity index 78%
rename from ql/src/test/queries/clientnegative/minimr_broken_pipe.q
rename to ql/src/test/queries/clientnegative/broken_pipe.q
index 4960089..e3416e9 100644
--- a/ql/src/test/queries/clientnegative/minimr_broken_pipe.q
+++ b/ql/src/test/queries/clientnegative/broken_pipe.q
@@ -1,4 +1,5 @@
 --! qt:dataset:src
+set hive.llap.execution.mode=auto;
 set hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
 set hive.exec.script.allow.partial.consumption = false;
 -- Tests exception in ScriptOperator.close() by passing to the operator a small amount of data
diff --git a/ql/src/test/queries/clientnegative/bucket_mapjoin_mismatch1.q b/ql/src/test/queries/clientnegative/bucket_mapjoin_mismatch1.q
deleted file mode 100644
index 118db89..0000000
--- a/ql/src/test/queries/clientnegative/bucket_mapjoin_mismatch1.q
+++ /dev/null
@@ -1,46 +0,0 @@
-set hive.strict.checks.bucketing=false;
-
-set hive.mapred.mode=nonstrict;
-CREATE TABLE srcbucket_mapjoin_part (key int, value string) 
-  partitioned by (ds string) CLUSTERED BY (key) INTO 3 BUCKETS
-  STORED AS TEXTFILE;
-load data local inpath '../../data/files/bmj/000000_0'
-  INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08');
-load data local inpath '../../data/files/bmj/000001_0'
-  INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08');
-load data local inpath '../../data/files/bmj/000002_0'
-  INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08');
-
-CREATE TABLE srcbucket_mapjoin_part_2 (key int, value string)
-  partitioned by (ds string) CLUSTERED BY (key) INTO 2 BUCKETS
-  STORED AS TEXTFILE;
-load data local inpath '../../data/files/bmj/000000_0'
-  INTO TABLE srcbucket_mapjoin_part_2 partition(ds='2008-04-08');
-load data local inpath '../../data/files/bmj/000001_0'
-  INTO TABLE srcbucket_mapjoin_part_2 partition(ds='2008-04-08');
-
--- The number of buckets in the 2 tables above (being joined later) dont match.
--- Throw an error if the user requested a bucketed mapjoin to be enforced.
--- In the default case (hive.enforce.bucketmapjoin=false), the query succeeds 
--- even though mapjoin is not being performed
-
-explain
-select a.key, a.value, b.value 
-from srcbucket_mapjoin_part a join srcbucket_mapjoin_part_2 b
-on a.key=b.key and a.ds="2008-04-08" and b.ds="2008-04-08";
-
-set hive.cbo.enable=false;
-set hive.optimize.bucketmapjoin = true;
-
-explain
-select /*+mapjoin(b)*/ a.key, a.value, b.value 
-from srcbucket_mapjoin_part a join srcbucket_mapjoin_part_2 b
-on a.key=b.key and a.ds="2008-04-08" and b.ds="2008-04-08";
-
-set hive.enforce.bucketmapjoin=true;
-
-explain
-select /*+mapjoin(b)*/ a.key, a.value, b.value 
-from srcbucket_mapjoin_part a join srcbucket_mapjoin_part_2 b
-on a.key=b.key and a.ds="2008-04-08" and b.ds="2008-04-08";
-
diff --git a/ql/src/test/queries/clientnegative/bucket_mapjoin_wrong_table_metadata_1.q b/ql/src/test/queries/clientnegative/bucket_mapjoin_wrong_table_metadata_1.q
deleted file mode 100644
index 94e4441..0000000
--- a/ql/src/test/queries/clientnegative/bucket_mapjoin_wrong_table_metadata_1.q
+++ /dev/null
@@ -1,22 +0,0 @@
-set hive.strict.checks.bucketing=false; 
-
--- Although the user has specified a bucketed map-join, the number of buckets in the table
--- do not match the number of files
-drop table table1;
-drop table table2;
-
-create table table1(key string, value string) clustered by (key, value)
-into 2 BUCKETS stored as textfile;
-create table table2(key string, value string) clustered by (value, key)
-into 2 BUCKETS stored as textfile;
-
-load data local inpath '../../data/files/bucket_files/000000_0' overwrite into table table1;
-
-load data local inpath '../../data/files/bucket_files/000000_0' overwrite into table table2;
-load data local inpath '../../data/files/bucket_files/000001_0' overwrite into table table2;
-
-set hive.optimize.bucketmapjoin = true;
-set hive.input.format = org.apache.hadoop.hive.ql.io.BucketizedHiveInputFormat;
-set hive.cbo.enable=false;
-select /*+ mapjoin(b) */ count(*) from table1 a join table2 b on a.key=b.key and a.value=b.value;
-
diff --git a/ql/src/test/queries/clientnegative/bucket_mapjoin_wrong_table_metadata_2.q b/ql/src/test/queries/clientnegative/bucket_mapjoin_wrong_table_metadata_2.q
deleted file mode 100644
index 9fe98a5..0000000
--- a/ql/src/test/queries/clientnegative/bucket_mapjoin_wrong_table_metadata_2.q
+++ /dev/null
@@ -1,27 +0,0 @@
-set hive.strict.checks.bucketing=false; 
-
--- Although the user has specified a bucketed map-join, the number of buckets in the table
--- do not match the number of files
-drop table table1;
-drop table table2;
-
-create table table1(key string, value string) partitioned by (ds string) clustered by (key, value)
-into 2 BUCKETS stored as textfile;
-create table table2(key string, value string) clustered by (value, key)
-into 2 BUCKETS stored as textfile;
-
-load data local inpath '../../data/files/bucket_files/000000_0' overwrite into table table1 partition (ds='1');
-load data local inpath '../../data/files/bucket_files/000001_0' overwrite into table table1 partition (ds='1');
-
-load data local inpath '../../data/files/bucket_files/000000_0' overwrite into table table1 partition (ds='2');
-
-load data local inpath '../../data/files/bucket_files/000000_0' overwrite into table table2;
-load data local inpath '../../data/files/bucket_files/000001_0' overwrite into table table2;
-
-set hive.cbo.enable=false;
-set hive.optimize.bucketmapjoin = true;
-set hive.input.format = org.apache.hadoop.hive.ql.io.BucketizedHiveInputFormat;
-
-select /*+ mapjoin(b) */ count(*) from table1 a join table2 b
-on a.key=b.key and a.value=b.value and a.ds is not null;
-
diff --git a/ql/src/test/queries/clientnegative/cachingprintstream.q b/ql/src/test/queries/clientnegative/cachingprintstream.q
index a95829c..a1939b6 100644
--- a/ql/src/test/queries/clientnegative/cachingprintstream.q
+++ b/ql/src/test/queries/clientnegative/cachingprintstream.q
@@ -1,4 +1,5 @@
 --! qt:dataset:src
+set hive.llap.execution.mode=auto;
 set hive.exec.failure.hooks=org.apache.hadoop.hive.ql.hooks.VerifyCachingPrintStreamHook;
 set hive.exec.post.hooks=org.apache.hadoop.hive.ql.hooks.VerifyCachingPrintStreamHook;
 
diff --git a/ql/src/test/queries/clientnegative/ct_noperm_loc.q b/ql/src/test/queries/clientnegative/ct_noperm_loc.q
index 4be0bcd..ee685d5 100644
--- a/ql/src/test/queries/clientnegative/ct_noperm_loc.q
+++ b/ql/src/test/queries/clientnegative/ct_noperm_loc.q
@@ -1,8 +1,12 @@
 --! qt:authorizer
 
 dfs ${system:test.dfs.mkdir} hdfs:///tmp/ct_noperm_loc;
+dfs -chmod 777 hdfs:///tmp;
 
 set user.name=user1;
 
+-- this will succeed because everybody can write to /tmp
 create table foo0(id int) location 'hdfs:///tmp/ct_noperm_loc_foo0';
+
+-- this will fail because user1 cannot write to /tmp/ct_noperm_loc
 create table foo1(id int) location 'hdfs:///tmp/ct_noperm_loc/foo1';
diff --git a/ql/src/test/queries/clientnegative/dyn_part3.q b/ql/src/test/queries/clientnegative/dyn_part3.q
index ed036b4..1ec3a94 100644
--- a/ql/src/test/queries/clientnegative/dyn_part3.q
+++ b/ql/src/test/queries/clientnegative/dyn_part3.q
@@ -1,8 +1,6 @@
 --! qt:dataset:src
-set hive.exec.max.dynamic.partitions=600;
-set hive.exec.max.dynamic.partitions.pernode=600;
+set hive.exec.max.dynamic.partitions=100;
 set hive.exec.dynamic.partition=true;
-set hive.exec.max.created.files=100;
 
 create table nzhang_part( key string) partitioned by (value string);
 
diff --git a/ql/src/test/queries/clientnegative/dyn_part_max_per_node.q b/ql/src/test/queries/clientnegative/dyn_part_max_per_node.q
index a7f4537..e3c41e1 100644
--- a/ql/src/test/queries/clientnegative/dyn_part_max_per_node.q
+++ b/ql/src/test/queries/clientnegative/dyn_part_max_per_node.q
@@ -9,6 +9,11 @@ set hive.exec.dynamic.partition=true;
 set hive.exec.max.dynamic.partitions=1000;
 set hive.exec.max.dynamic.partitions.pernode=10;
 
+-- Tez may create multiple tasks for the final reducer. Sometimes more than
+-- one of them fail approximately the same time which affects the error output.
+-- In order to get a predictable error, we set the number of reducers to 1 here.
+set mapred.reduce.tasks=1;
+
 INSERT OVERWRITE TABLE max_parts PARTITION(value)
 SELECT key, value
 FROM src
diff --git a/ql/src/test/queries/clientnegative/fallbackauth_disallow_transform.q b/ql/src/test/queries/clientnegative/fallbackauth_disallow_transform.q
index eb9f680..4ea7b87 100644
--- a/ql/src/test/queries/clientnegative/fallbackauth_disallow_transform.q
+++ b/ql/src/test/queries/clientnegative/fallbackauth_disallow_transform.q
@@ -1,3 +1,4 @@
+set hive.llap.execution.mode=auto;
 set hive.test.authz.sstd.hs2.mode=true;
 set hive.security.authorization.enabled=true;
 set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.fallback.FallbackHiveAuthorizerFactory;
diff --git a/ql/src/test/queries/clientnegative/insert_into1.q b/ql/src/test/queries/clientnegative/insert_into1.q
index e667b10..6cd7d99 100644
--- a/ql/src/test/queries/clientnegative/insert_into1.q
+++ b/ql/src/test/queries/clientnegative/insert_into1.q
@@ -1,6 +1,7 @@
 --! qt:dataset:src
 set hive.lock.numretries=5;
 set hive.lock.sleep.between.retries=5;
+set hive.support.concurrency=true;
 
 DROP TABLE insert_into1_neg;
 
diff --git a/ql/src/test/queries/clientnegative/insert_into2.q b/ql/src/test/queries/clientnegative/insert_into2.q
index 8735401..5bf9025 100644
--- a/ql/src/test/queries/clientnegative/insert_into2.q
+++ b/ql/src/test/queries/clientnegative/insert_into2.q
@@ -1,6 +1,7 @@
 --! qt:dataset:src
 set hive.lock.numretries=5;
 set hive.lock.sleep.between.retries=5;
+set hive.support.concurrency=true;
 
 DROP TABLE insert_into1_neg;
 CREATE TABLE insert_into1_neg (key int, value string);
diff --git a/ql/src/test/queries/clientnegative/insert_into3.q b/ql/src/test/queries/clientnegative/insert_into3.q
index 0907cdd..a993e66 100644
--- a/ql/src/test/queries/clientnegative/insert_into3.q
+++ b/ql/src/test/queries/clientnegative/insert_into3.q
@@ -1,6 +1,7 @@
 --! qt:dataset:src
 set hive.lock.numretries=5;
 set hive.lock.sleep.between.retries=5;
+set hive.support.concurrency=true;
 
 DROP TABLE insert_into3_neg;
 
diff --git a/ql/src/test/queries/clientnegative/insert_into4.q b/ql/src/test/queries/clientnegative/insert_into4.q
index 134ca7b..dd8d11e 100644
--- a/ql/src/test/queries/clientnegative/insert_into4.q
+++ b/ql/src/test/queries/clientnegative/insert_into4.q
@@ -1,6 +1,7 @@
 --! qt:dataset:src
 set hive.lock.numretries=5;
 set hive.lock.sleep.between.retries=5;
+set hive.support.concurrency=true;
 
 DROP TABLE insert_into3_neg;
 
diff --git a/ql/src/test/queries/clientnegative/invalid_mapjoin1.q b/ql/src/test/queries/clientnegative/invalid_mapjoin1.q
deleted file mode 100644
index 3a3f81c..0000000
--- a/ql/src/test/queries/clientnegative/invalid_mapjoin1.q
+++ /dev/null
@@ -1,3 +0,0 @@
---! qt:dataset:src
-set hive.cbo.enable=false;
-select /*+ MAPJOIN(a) ,MAPJOIN(b)*/ * from src a join src b on (a.key=b.key and a.value=b.value);
diff --git a/ql/src/test/queries/clientnegative/join2.q b/ql/src/test/queries/clientnegative/join2.q
deleted file mode 100644
index 71d9c3c..0000000
--- a/ql/src/test/queries/clientnegative/join2.q
+++ /dev/null
@@ -1,8 +0,0 @@
---! qt:dataset:src1
---! qt:dataset:src
-set hive.cbo.enable=false;
-SELECT /*+ MAPJOIN(x) */ x.key, x.value, y.value
-FROM src1 x LEFT OUTER JOIN src y ON (x.key = y.key);
-
-
-
diff --git a/ql/src/test/queries/clientnegative/join28.q b/ql/src/test/queries/clientnegative/join28.q
deleted file mode 100644
index 0ffdd56..0000000
--- a/ql/src/test/queries/clientnegative/join28.q
+++ /dev/null
@@ -1,18 +0,0 @@
---! qt:dataset:srcpart
---! qt:dataset:src1
---! qt:dataset:src
-CREATE TABLE dest_j1(key STRING, value STRING) STORED AS TEXTFILE;
-set hive.cbo.enable=false;
--- Mapjoin followed by mapjoin is not supported.
--- The same query would work fine without the hint.
--- Note that there is a positive test with the same name in clientpositive
-EXPLAIN
-INSERT OVERWRITE TABLE dest_j1 
-SELECT /*+ MAPJOIN(z) */ subq.key1, z.value
-FROM
-(SELECT /*+ MAPJOIN(x) */ x.key as key1, x.value as value1, y.key as key2, y.value as value2 
- FROM src1 x JOIN src y ON (x.key = y.key)) subq
- JOIN srcpart z ON (subq.key1 = z.key and z.ds='2008-04-08' and z.hr=11);
-
-
-
diff --git a/ql/src/test/queries/clientnegative/join29.q b/ql/src/test/queries/clientnegative/join29.q
deleted file mode 100644
index fd47a11..0000000
--- a/ql/src/test/queries/clientnegative/join29.q
+++ /dev/null
@@ -1,12 +0,0 @@
---! qt:dataset:src1
---! qt:dataset:src
-CREATE TABLE dest_j1(key STRING, cnt1 INT, cnt2 INT);
-set hive.cbo.enable=false;
--- Mapjoin followed by group by is not supported.
--- The same query would work without the hint
--- Note that there is a positive test with the same name in clientpositive
-EXPLAIN 
-INSERT OVERWRITE TABLE dest_j1 
-SELECT /*+ MAPJOIN(subq1) */ subq1.key, subq1.cnt, subq2.cnt
-FROM (select x.key, count(1) as cnt from src1 x group by x.key) subq1 JOIN 
-     (select y.key, count(1) as cnt from src y group by y.key) subq2 ON (subq1.key = subq2.key);
diff --git a/ql/src/test/queries/clientnegative/join32.q b/ql/src/test/queries/clientnegative/join32.q
deleted file mode 100644
index 3b6babb..0000000
--- a/ql/src/test/queries/clientnegative/join32.q
+++ /dev/null
@@ -1,21 +0,0 @@
---! qt:dataset:srcpart
---! qt:dataset:src1
---! qt:dataset:src
-set hive.cbo.enable=false;
-
--- SORT_QUERY_RESULTS
-
-CREATE TABLE dest_j1(key STRING, value STRING, val2 STRING) STORED AS TEXTFILE;
-
--- Mapjoin followed by Mapjoin is not supported.
--- The same query would work without the hint
--- Note that there is a positive test with the same name in clientpositive
-EXPLAIN EXTENDED
-INSERT OVERWRITE TABLE dest_j1
-SELECT /*+ MAPJOIN(x,z) */ x.key, z.value, y.value
-FROM src1 x JOIN src y ON (x.key = y.key) 
-JOIN srcpart z ON (x.value = z.value and z.ds='2008-04-08' and z.hr=11);
-
-
-
-
diff --git a/ql/src/test/queries/clientnegative/join35.q b/ql/src/test/queries/clientnegative/join35.q
deleted file mode 100644
index 252f66b..0000000
--- a/ql/src/test/queries/clientnegative/join35.q
+++ /dev/null
@@ -1,20 +0,0 @@
---! qt:dataset:src1
---! qt:dataset:src
-CREATE TABLE dest_j1(key STRING, value STRING, val2 INT) STORED AS TEXTFILE;
-set hive.cbo.enable=false;
--- Mapjoin followed by union is not supported.
--- The same query would work without the hint
--- Note that there is a positive test with the same name in clientpositive
-EXPLAIN EXTENDED
-INSERT OVERWRITE TABLE dest_j1
-SELECT /*+ MAPJOIN(x) */ x.key, x.value, subq1.cnt
-FROM 
-( SELECT x.key as key, count(1) as cnt from src x where x.key < 20 group by x.key
-     UNION ALL
-  SELECT x1.key as key, count(1) as cnt from src x1 where x1.key > 100 group by x1.key
-) subq1
-JOIN src1 x ON (x.key = subq1.key);
-
-
-
-
diff --git a/ql/src/test/queries/clientnegative/local_mapred_error_cache.q b/ql/src/test/queries/clientnegative/local_mapred_error_cache.q
deleted file mode 100644
index 8ee1358..0000000
--- a/ql/src/test/queries/clientnegative/local_mapred_error_cache.q
+++ /dev/null
@@ -1,5 +0,0 @@
---! qt:dataset:src
-set hive.exec.mode.local.auto=true;
-set hive.exec.failure.hooks=org.apache.hadoop.hive.ql.hooks.VerifySessionStateLocalErrorsHook;
-
-FROM src SELECT TRANSFORM(key, value) USING 'python ../../data/scripts/cat_error.py' AS (key, value);
diff --git a/ql/src/test/queries/clientnegative/lockneg1.q b/ql/src/test/queries/clientnegative/lockneg1.q
index 90a23c4..511f1fe 100644
--- a/ql/src/test/queries/clientnegative/lockneg1.q
+++ b/ql/src/test/queries/clientnegative/lockneg1.q
@@ -1,4 +1,5 @@
 --! qt:dataset:src
+set hive.support.concurrency=true;
 drop table tstsrc;
 create table tstsrc like src;
 insert overwrite table tstsrc select key, value from src;
diff --git a/ql/src/test/queries/clientnegative/lockneg2.q b/ql/src/test/queries/clientnegative/lockneg2.q
index e073b62..d70bef9 100644
--- a/ql/src/test/queries/clientnegative/lockneg2.q
+++ b/ql/src/test/queries/clientnegative/lockneg2.q
@@ -1,4 +1,5 @@
 --! qt:dataset:src
+set hive.support.concurrency=true;
 drop table tstsrc;
 create table tstsrc like src;
 insert overwrite table tstsrc select key, value from src;
diff --git a/ql/src/test/queries/clientnegative/lockneg3.q b/ql/src/test/queries/clientnegative/lockneg3.q
index a606d62..a0b2cd2 100644
--- a/ql/src/test/queries/clientnegative/lockneg3.q
+++ b/ql/src/test/queries/clientnegative/lockneg3.q
@@ -1,4 +1,5 @@
 --! qt:dataset:srcpart
+set hive.support.concurrency=true;
 drop table tstsrcpart;
 create table tstsrcpart like srcpart;
 
diff --git a/ql/src/test/queries/clientnegative/lockneg4.q b/ql/src/test/queries/clientnegative/lockneg4.q
index 021832b..627e922 100644
--- a/ql/src/test/queries/clientnegative/lockneg4.q
+++ b/ql/src/test/queries/clientnegative/lockneg4.q
@@ -1,4 +1,5 @@
 --! qt:dataset:srcpart
+set hive.support.concurrency=true;
 drop table tstsrcpart;
 create table tstsrcpart like srcpart;
 
diff --git a/ql/src/test/queries/clientnegative/lockneg5.q b/ql/src/test/queries/clientnegative/lockneg5.q
index 19c1ce2..08e8d72 100644
--- a/ql/src/test/queries/clientnegative/lockneg5.q
+++ b/ql/src/test/queries/clientnegative/lockneg5.q
@@ -1,2 +1,3 @@
+set hive.support.concurrency=true;
 drop table tstsrcpart;
 show locks tstsrcpart extended;
\ No newline at end of file
diff --git a/ql/src/test/queries/clientnegative/lockneg_query_tbl_in_locked_db.q b/ql/src/test/queries/clientnegative/lockneg_query_tbl_in_locked_db.q
index b68e712..979f981 100644
--- a/ql/src/test/queries/clientnegative/lockneg_query_tbl_in_locked_db.q
+++ b/ql/src/test/queries/clientnegative/lockneg_query_tbl_in_locked_db.q
@@ -1,5 +1,6 @@
 --! qt:dataset:srcpart
 set hive.compute.query.using.stats=false;
+set hive.support.concurrency=true;
 create database lockneg1;
 use lockneg1;
 
diff --git a/ql/src/test/queries/clientnegative/lockneg_try_db_lock_conflict.q b/ql/src/test/queries/clientnegative/lockneg_try_db_lock_conflict.q
index 1f9ad90..63eba1c 100644
--- a/ql/src/test/queries/clientnegative/lockneg_try_db_lock_conflict.q
+++ b/ql/src/test/queries/clientnegative/lockneg_try_db_lock_conflict.q
@@ -1,4 +1,5 @@
 set hive.lock.numretries=0;
+set hive.support.concurrency=true;
 
 create database lockneg4;
 
diff --git a/ql/src/test/queries/clientnegative/lockneg_try_drop_locked_db.q b/ql/src/test/queries/clientnegative/lockneg_try_drop_locked_db.q
index 8cbe310..cb8141d 100644
--- a/ql/src/test/queries/clientnegative/lockneg_try_drop_locked_db.q
+++ b/ql/src/test/queries/clientnegative/lockneg_try_drop_locked_db.q
@@ -1,4 +1,5 @@
 set hive.lock.numretries=0;
+set hive.support.concurrency=true;
 
 create database lockneg9;
 
diff --git a/ql/src/test/queries/clientnegative/lockneg_try_lock_db_in_use.q b/ql/src/test/queries/clientnegative/lockneg_try_lock_db_in_use.q
index cbb1e83..be2fe71 100644
--- a/ql/src/test/queries/clientnegative/lockneg_try_lock_db_in_use.q
+++ b/ql/src/test/queries/clientnegative/lockneg_try_lock_db_in_use.q
@@ -1,5 +1,6 @@
 --! qt:dataset:srcpart
 set hive.lock.numretries=0;
+set hive.support.concurrency=true;
 
 create database lockneg2;
 use lockneg2;
diff --git a/ql/src/test/queries/clientnegative/mapreduce_stack_trace_turnoff.q b/ql/src/test/queries/clientnegative/mapreduce_stack_trace_turnoff.q
deleted file mode 100644
index d1b588b..0000000
--- a/ql/src/test/queries/clientnegative/mapreduce_stack_trace_turnoff.q
+++ /dev/null
@@ -1,15 +0,0 @@
---! qt:dataset:src
-
-set hive.vectorized.execution.enabled=false;
-set hive.exec.mode.local.auto=false;
-set hive.exec.job.debug.capture.stacktraces=false;
-set hive.exec.failure.hooks=org.apache.hadoop.hive.ql.hooks.VerifySessionStateStackTracesHook;
-
-FROM src SELECT TRANSFORM(key, value) USING 'script_does_not_exist' AS (key, value);
-
--- Hadoop 0.23 changes the getTaskDiagnostics behavior
--- The Error Code of hive failure MapReduce job changes
--- In Hadoop 0.20
--- Hive failure MapReduce job gets 20000 as Error Code
--- In Hadoop 0.23
--- Hive failure MapReduce job gets 2 as Error Code
diff --git a/ql/src/test/queries/clientnegative/msck_repair_1.q b/ql/src/test/queries/clientnegative/msck_repair_1.q
index d07afaa..584f0a4 100644
--- a/ql/src/test/queries/clientnegative/msck_repair_1.q
+++ b/ql/src/test/queries/clientnegative/msck_repair_1.q
@@ -6,7 +6,7 @@ CREATE TABLE repairtable(col STRING) PARTITIONED BY (p1 STRING, p2 STRING);
 
 MSCK TABLE repairtable;
 
-dfs ${system:test.dfs.mkdir} ${system:test.warehouse.dir}/repairtable/p1=c;
+dfs ${system:test.dfs.mkdir} ${hiveconf:hive.metastore.warehouse.dir}/repairtable/p1=c;
 
 MSCK TABLE default.repairtable;
 
diff --git a/ql/src/test/queries/clientnegative/msck_repair_2.q b/ql/src/test/queries/clientnegative/msck_repair_2.q
index 8810e70..59d4a24 100644
--- a/ql/src/test/queries/clientnegative/msck_repair_2.q
+++ b/ql/src/test/queries/clientnegative/msck_repair_2.q
@@ -6,8 +6,8 @@ CREATE TABLE repairtable(col STRING) PARTITIONED BY (p1 STRING, p2 STRING);
 
 MSCK TABLE repairtable;
 
-dfs ${system:test.dfs.mkdir} ${system:test.warehouse.dir}/repairtable/p1=c;
-dfs -touchz ${system:test.warehouse.dir}/repairtable/p1=c/datafile;
+dfs ${system:test.dfs.mkdir} ${hiveconf:hive.metastore.warehouse.dir}/repairtable/p1=c;
+dfs -touchz ${hiveconf:hive.metastore.warehouse.dir}/repairtable/p1=c/datafile;
 
 MSCK TABLE default.repairtable;
 
diff --git a/ql/src/test/queries/clientnegative/msck_repair_3.q b/ql/src/test/queries/clientnegative/msck_repair_3.q
index 28cce2e..d2c3159 100644
--- a/ql/src/test/queries/clientnegative/msck_repair_3.q
+++ b/ql/src/test/queries/clientnegative/msck_repair_3.q
@@ -6,9 +6,9 @@ CREATE TABLE repairtable(col STRING) PARTITIONED BY (p1 STRING, p2 STRING);
 
 MSCK TABLE repairtable;
 
-dfs ${system:test.dfs.mkdir} ${system:test.warehouse.dir}/repairtable/p1=c/p2=a/p3=b;
-dfs -touchz ${system:test.warehouse.dir}/repairtable/p1=c/p2=a/p3=b/datafile;
-dfs -touchz ${system:test.warehouse.dir}/repairtable/p1=c/datafile;
+dfs ${system:test.dfs.mkdir} ${hiveconf:hive.metastore.warehouse.dir}/repairtable/p1=c/p2=a/p3=b;
+dfs -touchz ${hiveconf:hive.metastore.warehouse.dir}/repairtable/p1=c/p2=a/p3=b/datafile;
+dfs -touchz ${hiveconf:hive.metastore.warehouse.dir}/repairtable/p1=c/datafile;
 
 MSCK TABLE default.repairtable;
 
diff --git a/ql/src/test/queries/clientnegative/msck_repair_4.q b/ql/src/test/queries/clientnegative/msck_repair_4.q
index f38b759..d6edd59 100644
--- a/ql/src/test/queries/clientnegative/msck_repair_4.q
+++ b/ql/src/test/queries/clientnegative/msck_repair_4.q
@@ -6,8 +6,8 @@ CREATE TABLE repairtable(col STRING) PARTITIONED BY (p1 STRING, p2 STRING);
 
 MSCK TABLE repairtable;
 
-dfs ${system:test.dfs.mkdir} ${system:test.warehouse.dir}/repairtable/p2=c/p1=a/p3=b;
-dfs -touchz ${system:test.warehouse.dir}/repairtable/p2=c/p1=a/p3=b/datafile;
+dfs ${system:test.dfs.mkdir} ${hiveconf:hive.metastore.warehouse.dir}/repairtable/p2=c/p1=a/p3=b;
+dfs -touchz ${hiveconf:hive.metastore.warehouse.dir}/repairtable/p2=c/p1=a/p3=b/datafile;
 
 MSCK REPAIR TABLE default.repairtable;
 
diff --git a/ql/src/test/queries/clientnegative/msck_repair_5.q b/ql/src/test/queries/clientnegative/msck_repair_5.q
index fe1eab7..cdcbf55 100644
--- a/ql/src/test/queries/clientnegative/msck_repair_5.q
+++ b/ql/src/test/queries/clientnegative/msck_repair_5.q
@@ -4,12 +4,12 @@ CREATE TABLE repairtable(col STRING) PARTITIONED BY (p1 STRING);
 
 MSCK REPAIR TABLE default.repairtable;
 
-dfs ${system:test.dfs.mkdir} ${system:test.warehouse.dir}/repairtable/p1=A;
+dfs ${system:test.dfs.mkdir} ${hiveconf:hive.metastore.warehouse.dir}/repairtable/p1=A;
 
 MSCK REPAIR TABLE default.repairtable;
 
-dfs ${system:test.dfs.mkdir} ${system:test.warehouse.dir}/repairtable/p1=a;
-dfs ${system:test.dfs.mkdir} ${system:test.warehouse.dir}/repairtable/P1=a;
+dfs ${system:test.dfs.mkdir} ${hiveconf:hive.metastore.warehouse.dir}/repairtable/p1=a;
+dfs ${system:test.dfs.mkdir} ${hiveconf:hive.metastore.warehouse.dir}/repairtable/P1=a;
 
 MSCK REPAIR TABLE default.repairtable;
 
diff --git a/ql/src/test/queries/clientnegative/msck_repair_6.q b/ql/src/test/queries/clientnegative/msck_repair_6.q
index 76e8557..cab00f4 100644
--- a/ql/src/test/queries/clientnegative/msck_repair_6.q
+++ b/ql/src/test/queries/clientnegative/msck_repair_6.q
@@ -4,11 +4,11 @@ CREATE TABLE repairtable(col STRING) PARTITIONED BY (p1 STRING);
 
 MSCK REPAIR TABLE default.repairtable;
 
-dfs ${system:test.dfs.mkdir} ${system:test.warehouse.dir}/repairtable/p1=a;
+dfs ${system:test.dfs.mkdir} ${hiveconf:hive.metastore.warehouse.dir}/repairtable/p1=a;
 
 MSCK REPAIR TABLE default.repairtable;
 
-dfs ${system:test.dfs.mkdir} ${system:test.warehouse.dir}/repairtable/P1=a;
+dfs ${system:test.dfs.mkdir} ${hiveconf:hive.metastore.warehouse.dir}/repairtable/P1=a;
 
 MSCK REPAIR TABLE default.repairtable;
 
diff --git a/ql/src/test/queries/clientnegative/script_broken_pipe2.q b/ql/src/test/queries/clientnegative/script_broken_pipe2.q
index 52b6b3c..ff49bee 100644
--- a/ql/src/test/queries/clientnegative/script_broken_pipe2.q
+++ b/ql/src/test/queries/clientnegative/script_broken_pipe2.q
@@ -1,4 +1,5 @@
 --! qt:dataset:src
+set hive.llap.execution.mode=auto;
 set hive.exec.script.allow.partial.consumption = false;
 -- Tests exception in ScriptOperator.processOp() by passing extra data needed to fill pipe buffer
 SELECT TRANSFORM(key, value, key, value, key, value, key, value, key, value, key, value, key, value, key, value, key, value, key, value, key, value, key, value) USING 'true' as a,b,c,d FROM src;
diff --git a/ql/src/test/queries/clientnegative/script_broken_pipe3.q b/ql/src/test/queries/clientnegative/script_broken_pipe3.q
index 9aac02e..35399b7 100644
--- a/ql/src/test/queries/clientnegative/script_broken_pipe3.q
+++ b/ql/src/test/queries/clientnegative/script_broken_pipe3.q
@@ -1,4 +1,5 @@
 --! qt:dataset:src
+set hive.llap.execution.mode=auto;
 set hive.exec.script.allow.partial.consumption = true;
 -- Test to ensure that a script with a bad error code still fails even with partial consumption
-SELECT TRANSFORM(*) USING 'false' AS a, b FROM (SELECT TRANSFORM(*) USING 'echo' AS a, b FROM src LIMIT 1) tmp;
+SELECT TRANSFORM(*) USING 'false' AS a, b FROM (SELECT TRANSFORM(*) USING 'echo' AS a, b FROM src LIMIT 2) tmp;
diff --git a/ql/src/test/queries/clientnegative/script_error.q b/ql/src/test/queries/clientnegative/script_error.q
index 557195c..604c354 100644
--- a/ql/src/test/queries/clientnegative/script_error.q
+++ b/ql/src/test/queries/clientnegative/script_error.q
@@ -1,4 +1,5 @@
 --! qt:dataset:src
+set hive.llap.execution.mode=auto;
 EXPLAIN
 SELECT TRANSFORM(src.key, src.value) USING '../../data/scripts/error_script' AS (tkey, tvalue)
 FROM src;
diff --git a/ql/src/test/queries/clientnegative/smb_bucketmapjoin.q b/ql/src/test/queries/clientnegative/smb_bucketmapjoin.q
deleted file mode 100644
index 8948b4a..0000000
--- a/ql/src/test/queries/clientnegative/smb_bucketmapjoin.q
+++ /dev/null
@@ -1,24 +0,0 @@
---! qt:dataset:src
-
-
-set hive.exec.reducers.max = 1;
-
-
-CREATE TABLE smb_bucket4_1(key int, value string) CLUSTERED BY (key) INTO 2 BUCKETS;
-
-
-CREATE TABLE smb_bucket4_2(key int, value string) CLUSTERED BY (key) INTO 2 BUCKETS;
-
-insert overwrite table smb_bucket4_1
-select * from src;
-
-insert overwrite table smb_bucket4_2
-select * from src;
-
-set hive.optimize.bucketmapjoin = true;
-set hive.optimize.bucketmapjoin.sortedmerge = true;
-set hive.cbo.enable=false;
-select /*+mapjoin(a)*/ * from smb_bucket4_1 a left outer join smb_bucket4_2 b on a.key = b.key;
-
-
-
diff --git a/ql/src/test/queries/clientnegative/smb_mapjoin_14.q b/ql/src/test/queries/clientnegative/smb_mapjoin_14.q
deleted file mode 100644
index 77f1cad..0000000
--- a/ql/src/test/queries/clientnegative/smb_mapjoin_14.q
+++ /dev/null
@@ -1,39 +0,0 @@
---! qt:dataset:src1
---! qt:dataset:src
-set hive.mapred.mode=nonstrict;
-set hive.exec.reducers.max = 1;
-
-CREATE TABLE tbl1(key int, value string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS;
-CREATE TABLE tbl2(key int, value string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS;
-
-insert overwrite table tbl1
-select * from src where key < 10;
-
-insert overwrite table tbl2
-select * from src where key < 10;
-
-set hive.optimize.bucketmapjoin = true;
-set hive.optimize.bucketmapjoin.sortedmerge = true;
-set hive.input.format = org.apache.hadoop.hive.ql.io.BucketizedHiveInputFormat;
-set hive.cbo.enable=false;
--- A join is being performed across different sub-queries, where a mapjoin is being performed in each of them.
--- Each sub-query should be converted to a sort-merge join.
--- A join followed by mapjoin is not allowed, so this query should fail.
--- Once HIVE-3403 is in, this should be automatically converted to a sort-merge join without the hint
-explain
-select src1.key, src1.cnt1, src2.cnt1 from
-(
-  select key, count(*) as cnt1 from 
-  (
-    select /*+mapjoin(a)*/ a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key
-  ) subq1 group by key
-) src1
-join
-(
-  select key, count(*) as cnt1 from 
-  (
-    select /*+mapjoin(a)*/ a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key
-  ) subq2 group by key
-) src2
-on src1.key = src2.key
-order by src1.key, src1.cnt1, src2.cnt1;
diff --git a/ql/src/test/queries/clientnegative/sortmerge_mapjoin_mismatch_1.q b/ql/src/test/queries/clientnegative/sortmerge_mapjoin_mismatch_1.q
deleted file mode 100644
index 50aff49..0000000
--- a/ql/src/test/queries/clientnegative/sortmerge_mapjoin_mismatch_1.q
+++ /dev/null
@@ -1,28 +0,0 @@
---! qt:dataset:src
-create table table_asc(key int, value string) CLUSTERED BY (key) SORTED BY (key asc) 
-INTO 1 BUCKETS STORED AS RCFILE; 
-create table table_desc(key int, value string) CLUSTERED BY (key) SORTED BY (key desc) 
-INTO 1 BUCKETS STORED AS RCFILE;
-
-
-
-
-insert overwrite table table_asc select key, value from src; 
-insert overwrite table table_desc select key, value from src;
-set hive.optimize.bucketmapjoin = true;
-set hive.optimize.bucketmapjoin.sortedmerge = true;
-set hive.input.format = org.apache.hadoop.hive.ql.io.BucketizedHiveInputFormat;
-set hive.cbo.enable=false;
--- If the user asked for sort merge join to be enforced (by setting
--- hive.enforce.sortmergebucketmapjoin to true), an error should be thrown, since
--- one of the tables is in ascending order and the other is in descending order,
--- and sort merge bucket mapjoin cannot be performed. In the default mode, the
--- query would succeed, although a regular map-join would be performed instead of
--- what the user asked.
-
-explain 
-select /*+mapjoin(a)*/ * from table_asc a join table_desc b on a.key = b.key;
-
-set hive.enforce.sortmergebucketmapjoin=true;
-explain 
-select /*+mapjoin(a)*/ * from table_asc a join table_desc b on a.key = b.key;
diff --git a/ql/src/test/queries/clientnegative/mapreduce_stack_trace.q b/ql/src/test/queries/clientnegative/stack_trace.q
similarity index 100%
rename from ql/src/test/queries/clientnegative/mapreduce_stack_trace.q
rename to ql/src/test/queries/clientnegative/stack_trace.q
diff --git a/ql/src/test/queries/clientnegative/subquery_scalar_corr_multi_rows.q b/ql/src/test/queries/clientnegative/subquery_scalar_corr_multi_rows.q
index 47fb513..9e721ac 100644
--- a/ql/src/test/queries/clientnegative/subquery_scalar_corr_multi_rows.q
+++ b/ql/src/test/queries/clientnegative/subquery_scalar_corr_multi_rows.q
@@ -1,4 +1,7 @@
 --! qt:dataset:part
 -- inner query produces more than one row
+
+-- TODO: Turn vectorization on after fixing HIVE-24595
+set hive.vectorized.execution.enabled=false;
 select * from part where p_size >
     (select count(*) from part p where p.p_mfgr = part.p_mfgr group by p_type);
\ No newline at end of file
diff --git a/ql/src/test/queries/clientnegative/subquery_scalar_multi_rows.q b/ql/src/test/queries/clientnegative/subquery_scalar_multi_rows.q
index 77f4f08..88f87a5 100644
--- a/ql/src/test/queries/clientnegative/subquery_scalar_multi_rows.q
+++ b/ql/src/test/queries/clientnegative/subquery_scalar_multi_rows.q
@@ -1,3 +1,6 @@
 --! qt:dataset:part
+
+-- TODO: Turn vectorization on after fixing HIVE-24595
+set hive.vectorized.execution.enabled=false;
 set hive.mapred.mode=nonstrict;
 select p_name from part where p_size > (select p_size from part);
diff --git a/ql/src/test/queries/clientnegative/udf_test_error_reduce.q b/ql/src/test/queries/clientnegative/udf_test_error_reduce.q
index e5c77cc..6b43ca0 100644
--- a/ql/src/test/queries/clientnegative/udf_test_error_reduce.q
+++ b/ql/src/test/queries/clientnegative/udf_test_error_reduce.q
@@ -1,7 +1,7 @@
 --! qt:dataset:src
+set hive.llap.execution.mode=auto;
 CREATE TEMPORARY FUNCTION test_error AS 'org.apache.hadoop.hive.ql.udf.UDFTestErrorOnFalse';
 
-
 SELECT test_error(key < 125 OR key > 130)
 FROM (
   SELECT *
diff --git a/ql/src/test/queries/clientnegative/union22.q b/ql/src/test/queries/clientnegative/union22.q
deleted file mode 100644
index 7d84423..0000000
--- a/ql/src/test/queries/clientnegative/union22.q
+++ /dev/null
@@ -1,28 +0,0 @@
---! qt:dataset:src
-set hive.mapred.mode=nonstrict;
-create table dst_union22(k1 string, k2 string, k3 string, k4 string) partitioned by (ds string);
-create table dst_union22_delta(k0 string, k1 string, k2 string, k3 string, k4 string, k5 string) partitioned by (ds string);
-
-insert overwrite table dst_union22 partition (ds='1')
-select key, value, key , value from src;
-
-insert overwrite table dst_union22_delta partition (ds='1')
-select key, key, value, key, value, value from src;
-
-set hive.merge.mapfiles=false;
-set hive.cbo.enable=false;
--- Union followed by Mapjoin is not supported.
--- The same query would work without the hint
--- Note that there is a positive test with the same name in clientpositive
-explain extended
-insert overwrite table dst_union22 partition (ds='2')
-select * from
-(
-select k1 as k1, k2 as k2, k3 as k3, k4 as k4 from dst_union22_delta where ds = '1' and k0 <= 50
-union all
-select /*+ MAPJOIN(b) */ a.k1 as k1, a.k2 as k2, b.k3 as k3, b.k4 as k4
-from dst_union22 a left outer join (select * from dst_union22_delta where ds = '1' and k0 > 50) b on
-a.k1 = b.k1 and a.ds='1'
-where a.k1 > 20
-)
-subq;
diff --git a/ql/src/test/results/clientnegative/avro_non_nullable_union.q.out b/ql/src/test/results/clientnegative/avro_non_nullable_union.q.out
index c933081..0dcebb7 100644
--- a/ql/src/test/results/clientnegative/avro_non_nullable_union.q.out
+++ b/ql/src/test/results/clientnegative/avro_non_nullable_union.q.out
@@ -34,5 +34,39 @@ PREHOOK: query: INSERT OVERWRITE TABLE union_non_nullable_test_avro SELECT * FRO
 PREHOOK: type: QUERY
 PREHOOK: Input: default@union_nullable_test_text
 PREHOOK: Output: default@union_non_nullable_test_avro
+Status: Failed
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Avro could not validate record against schema (record = {"id": 3, "value": null}) (schema = {"type":"record","name":"nullable","fields":[{"name":"id","type":"int"},{"name":"value","type":["int","double"]}]})
+#### A masked pattern was here ####
+Caused by: Avro could not validate record against schema (record = {"id": 3, "value": null}) (schema = {"type":"record","name":"nullable","fields":[{"name":"id","type":"int"},{"name":"value","type":["int","double"]}]})
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Avro could not validate record against schema (record = {"id": 3, "value": null}) (schema = {"type":"record","name":"nullable","fields":[{"name":"id","type":"int"},{"name":"value","type":["int","double"]}]})
+#### A masked pattern was here ####
+Caused by: Avro could not validate record against schema (record = {"id": 3, "value": null}) (schema = {"type":"record","name":"nullable","fields":[{"name":"id","type":"int"},{"name":"value","type":["int","double"]}]})
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Avro could not validate record against schema (record = {"id": 3, "value": null}) (schema = {"type":"record","name":"nullable","fields":[{"name":"id","type":"int"},{"name":"value","type":["int","double"]}]})
+#### A masked pattern was here ####
+Caused by: Avro could not validate record against schema (record = {"id": 3, "value": null}) (schema = {"type":"record","name":"nullable","fields":[{"name":"id","type":"int"},{"name":"value","type":["int","double"]}]})
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Avro could not validate record against schema (record = {"id": 3, "value": null}) (schema = {"type":"record","name":"nullable","fields":[{"name":"id","type":"int"},{"name":"value","type":["int","double"]}]})
+#### A masked pattern was here ####
+Caused by: Avro could not validate record against schema (record = {"id": 3, "value": null}) (schema = {"type":"record","name":"nullable","fields":[{"name":"id","type":"int"},{"name":"value","type":["int","double"]}]})
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
diff --git a/ql/src/test/results/clientnegative/bad_exec_hooks.q.out b/ql/src/test/results/clientnegative/bad_exec_hooks.q.out
index d0b47b7..648210b 100644
--- a/ql/src/test/results/clientnegative/bad_exec_hooks.q.out
+++ b/ql/src/test/results/clientnegative/bad_exec_hooks.q.out
@@ -5,4 +5,6 @@ java.lang.RuntimeException: Error loading hooks(hive.exec.pre.hooks): java.lang.
 #### A masked pattern was here ####
 
 #### A masked pattern was here ####
+Caused by: java.lang.ClassNotFoundException: "org.this.is.a.bad.class"
+#### A masked pattern was here ####
 
diff --git a/ql/src/test/results/clientnegative/broken_pipe.q.out b/ql/src/test/results/clientnegative/broken_pipe.q.out
new file mode 100644
index 0000000..3b83024
--- /dev/null
+++ b/ql/src/test/results/clientnegative/broken_pipe.q.out
@@ -0,0 +1,33 @@
+PREHOOK: query: SELECT TRANSFORM(*) USING 'true' AS a, b FROM (SELECT TRANSFORM(*) USING 'echo' AS a, b FROM src LIMIT 1) tmp
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: hdfs://### HDFS PATH ###
+Status: Failed
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
diff --git a/ql/src/test/results/clientnegative/bucket_mapjoin_mismatch1.q.out b/ql/src/test/results/clientnegative/bucket_mapjoin_mismatch1.q.out
deleted file mode 100644
index fe769ac..0000000
--- a/ql/src/test/results/clientnegative/bucket_mapjoin_mismatch1.q.out
+++ /dev/null
@@ -1,253 +0,0 @@
-PREHOOK: query: CREATE TABLE srcbucket_mapjoin_part (key int, value string) 
-  partitioned by (ds string) CLUSTERED BY (key) INTO 3 BUCKETS
-  STORED AS TEXTFILE
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@srcbucket_mapjoin_part
-POSTHOOK: query: CREATE TABLE srcbucket_mapjoin_part (key int, value string) 
-  partitioned by (ds string) CLUSTERED BY (key) INTO 3 BUCKETS
-  STORED AS TEXTFILE
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@srcbucket_mapjoin_part
-PREHOOK: query: load data local inpath '../../data/files/bmj/000000_0'
-  INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08')
-PREHOOK: type: LOAD
-#### A masked pattern was here ####
-PREHOOK: Output: default@srcbucket_mapjoin_part
-POSTHOOK: query: load data local inpath '../../data/files/bmj/000000_0'
-  INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08')
-POSTHOOK: type: LOAD
-#### A masked pattern was here ####
-POSTHOOK: Output: default@srcbucket_mapjoin_part
-POSTHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08
-PREHOOK: query: load data local inpath '../../data/files/bmj/000001_0'
-  INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08')
-PREHOOK: type: LOAD
-#### A masked pattern was here ####
-PREHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08
-POSTHOOK: query: load data local inpath '../../data/files/bmj/000001_0'
-  INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08')
-POSTHOOK: type: LOAD
-#### A masked pattern was here ####
-POSTHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08
-PREHOOK: query: load data local inpath '../../data/files/bmj/000002_0'
-  INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08')
-PREHOOK: type: LOAD
-#### A masked pattern was here ####
-PREHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08
-POSTHOOK: query: load data local inpath '../../data/files/bmj/000002_0'
-  INTO TABLE srcbucket_mapjoin_part partition(ds='2008-04-08')
-POSTHOOK: type: LOAD
-#### A masked pattern was here ####
-POSTHOOK: Output: default@srcbucket_mapjoin_part@ds=2008-04-08
-PREHOOK: query: CREATE TABLE srcbucket_mapjoin_part_2 (key int, value string)
-  partitioned by (ds string) CLUSTERED BY (key) INTO 2 BUCKETS
-  STORED AS TEXTFILE
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@srcbucket_mapjoin_part_2
-POSTHOOK: query: CREATE TABLE srcbucket_mapjoin_part_2 (key int, value string)
-  partitioned by (ds string) CLUSTERED BY (key) INTO 2 BUCKETS
-  STORED AS TEXTFILE
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@srcbucket_mapjoin_part_2
-PREHOOK: query: load data local inpath '../../data/files/bmj/000000_0'
-  INTO TABLE srcbucket_mapjoin_part_2 partition(ds='2008-04-08')
-PREHOOK: type: LOAD
-#### A masked pattern was here ####
-PREHOOK: Output: default@srcbucket_mapjoin_part_2
-POSTHOOK: query: load data local inpath '../../data/files/bmj/000000_0'
-  INTO TABLE srcbucket_mapjoin_part_2 partition(ds='2008-04-08')
-POSTHOOK: type: LOAD
-#### A masked pattern was here ####
-POSTHOOK: Output: default@srcbucket_mapjoin_part_2
-POSTHOOK: Output: default@srcbucket_mapjoin_part_2@ds=2008-04-08
-PREHOOK: query: load data local inpath '../../data/files/bmj/000001_0'
-  INTO TABLE srcbucket_mapjoin_part_2 partition(ds='2008-04-08')
-PREHOOK: type: LOAD
-#### A masked pattern was here ####
-PREHOOK: Output: default@srcbucket_mapjoin_part_2@ds=2008-04-08
-POSTHOOK: query: load data local inpath '../../data/files/bmj/000001_0'
-  INTO TABLE srcbucket_mapjoin_part_2 partition(ds='2008-04-08')
-POSTHOOK: type: LOAD
-#### A masked pattern was here ####
-POSTHOOK: Output: default@srcbucket_mapjoin_part_2@ds=2008-04-08
-PREHOOK: query: explain
-select a.key, a.value, b.value 
-from srcbucket_mapjoin_part a join srcbucket_mapjoin_part_2 b
-on a.key=b.key and a.ds="2008-04-08" and b.ds="2008-04-08"
-PREHOOK: type: QUERY
-PREHOOK: Input: default@srcbucket_mapjoin_part
-PREHOOK: Input: default@srcbucket_mapjoin_part@ds=2008-04-08
-PREHOOK: Input: default@srcbucket_mapjoin_part_2
-PREHOOK: Input: default@srcbucket_mapjoin_part_2@ds=2008-04-08
-#### A masked pattern was here ####
-POSTHOOK: query: explain
-select a.key, a.value, b.value 
-from srcbucket_mapjoin_part a join srcbucket_mapjoin_part_2 b
-on a.key=b.key and a.ds="2008-04-08" and b.ds="2008-04-08"
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@srcbucket_mapjoin_part
-POSTHOOK: Input: default@srcbucket_mapjoin_part@ds=2008-04-08
-POSTHOOK: Input: default@srcbucket_mapjoin_part_2
-POSTHOOK: Input: default@srcbucket_mapjoin_part_2@ds=2008-04-08
-#### A masked pattern was here ####
-STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-0 depends on stages: Stage-1
-
-STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: a
-            filterExpr: (key is not null and (ds = '2008-04-08')) (type: boolean)
-            Statistics: Num rows: 108 Data size: 16732 Basic stats: PARTIAL Column stats: NONE
-            Filter Operator
-              predicate: key is not null (type: boolean)
-              Statistics: Num rows: 88 Data size: 13633 Basic stats: PARTIAL Column stats: NONE
-              Select Operator
-                expressions: key (type: int), value (type: string)
-                outputColumnNames: _col0, _col1
-                Statistics: Num rows: 88 Data size: 13633 Basic stats: PARTIAL Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: int)
-                  null sort order: z
-                  sort order: +
-                  Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 88 Data size: 13633 Basic stats: PARTIAL Column stats: NONE
-                  value expressions: _col1 (type: string)
-          TableScan
-            alias: b
-            filterExpr: (key is not null and (ds = '2008-04-08')) (type: boolean)
-            Statistics: Num rows: 70 Data size: 10904 Basic stats: PARTIAL Column stats: NONE
-            Filter Operator
-              predicate: key is not null (type: boolean)
-              Statistics: Num rows: 57 Data size: 8878 Basic stats: PARTIAL Column stats: NONE
-              Select Operator
-                expressions: key (type: int), value (type: string)
-                outputColumnNames: _col0, _col1
-                Statistics: Num rows: 57 Data size: 8878 Basic stats: PARTIAL Column stats: NONE
-                Reduce Output Operator
-                  key expressions: _col0 (type: int)
-                  null sort order: z
-                  sort order: +
-                  Map-reduce partition columns: _col0 (type: int)
-                  Statistics: Num rows: 57 Data size: 8878 Basic stats: PARTIAL Column stats: NONE
-                  value expressions: _col1 (type: string)
-      Reduce Operator Tree:
-        Join Operator
-          condition map:
-               Inner Join 0 to 1
-          keys:
-            0 _col0 (type: int)
-            1 _col0 (type: int)
-          outputColumnNames: _col0, _col1, _col3
-          Statistics: Num rows: 96 Data size: 14996 Basic stats: PARTIAL Column stats: NONE
-          Select Operator
-            expressions: _col0 (type: int), _col1 (type: string), _col3 (type: string)
-            outputColumnNames: _col0, _col1, _col2
-            Statistics: Num rows: 96 Data size: 14996 Basic stats: PARTIAL Column stats: NONE
-            File Output Operator
-              compressed: false
-              Statistics: Num rows: 96 Data size: 14996 Basic stats: PARTIAL Column stats: NONE
-              table:
-                  input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                  output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-0
-    Fetch Operator
-      limit: -1
-      Processor Tree:
-        ListSink
-
-PREHOOK: query: explain
-select /*+mapjoin(b)*/ a.key, a.value, b.value 
-from srcbucket_mapjoin_part a join srcbucket_mapjoin_part_2 b
-on a.key=b.key and a.ds="2008-04-08" and b.ds="2008-04-08"
-PREHOOK: type: QUERY
-PREHOOK: Input: default@srcbucket_mapjoin_part
-PREHOOK: Input: default@srcbucket_mapjoin_part@ds=2008-04-08
-PREHOOK: Input: default@srcbucket_mapjoin_part_2
-PREHOOK: Input: default@srcbucket_mapjoin_part_2@ds=2008-04-08
-#### A masked pattern was here ####
-POSTHOOK: query: explain
-select /*+mapjoin(b)*/ a.key, a.value, b.value 
-from srcbucket_mapjoin_part a join srcbucket_mapjoin_part_2 b
-on a.key=b.key and a.ds="2008-04-08" and b.ds="2008-04-08"
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@srcbucket_mapjoin_part
-POSTHOOK: Input: default@srcbucket_mapjoin_part@ds=2008-04-08
-POSTHOOK: Input: default@srcbucket_mapjoin_part_2
-POSTHOOK: Input: default@srcbucket_mapjoin_part_2@ds=2008-04-08
-#### A masked pattern was here ####
-STAGE DEPENDENCIES:
-  Stage-3 is a root stage
-  Stage-1 depends on stages: Stage-3
-  Stage-0 depends on stages: Stage-1
-
-STAGE PLANS:
-  Stage: Stage-3
-    Map Reduce Local Work
-      Alias -> Map Local Tables:
-        b 
-          Fetch Operator
-            limit: -1
-      Alias -> Map Local Operator Tree:
-        b 
-          TableScan
-            alias: b
-            filterExpr: ((ds = '2008-04-08') and key is not null) (type: boolean)
-            Statistics: Num rows: 92 Data size: 44232 Basic stats: PARTIAL Column stats: NONE
-            Filter Operator
-              predicate: key is not null (type: boolean)
-              Statistics: Num rows: 88 Data size: 42308 Basic stats: PARTIAL Column stats: NONE
-              HashTable Sink Operator
-                keys:
-                  0 key (type: int)
-                  1 key (type: int)
-
-  Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: a
-            filterExpr: ((ds = '2008-04-08') and key is not null) (type: boolean)
-            Statistics: Num rows: 140 Data size: 67192 Basic stats: PARTIAL Column stats: NONE
-            Filter Operator
-              predicate: key is not null (type: boolean)
-              Statistics: Num rows: 133 Data size: 63832 Basic stats: PARTIAL Column stats: NONE
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 key (type: int)
-                  1 key (type: int)
-                outputColumnNames: _col0, _col1, _col7
-                Statistics: Num rows: 146 Data size: 70215 Basic stats: PARTIAL Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: int), _col1 (type: string), _col7 (type: string)
-                  outputColumnNames: _col0, _col1, _col2
-                  Statistics: Num rows: 146 Data size: 70215 Basic stats: PARTIAL Column stats: NONE
-                  File Output Operator
-                    compressed: false
-                    Statistics: Num rows: 146 Data size: 70215 Basic stats: PARTIAL Column stats: NONE
-                    table:
-                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-      Execution mode: vectorized
-      Local Work:
-        Map Reduce Local Work
-
-  Stage: Stage-0
-    Fetch Operator
-      limit: -1
-      Processor Tree:
-        ListSink
-
-FAILED: SemanticException [Error 10136]: Bucketed mapjoin cannot be performed. This can be due to multiple reasons:  . Join columns dont match bucketed columns.  . Number of buckets are not a multiple of each other. If you really want to perform the operation, either remove the mapjoin hint from your query or set hive.enforce.bucketmapjoin to false.
diff --git a/ql/src/test/results/clientnegative/bucket_mapjoin_wrong_table_metadata_1.q.out b/ql/src/test/results/clientnegative/bucket_mapjoin_wrong_table_metadata_1.q.out
deleted file mode 100644
index c20a6cd..0000000
--- a/ql/src/test/results/clientnegative/bucket_mapjoin_wrong_table_metadata_1.q.out
+++ /dev/null
@@ -1,53 +0,0 @@
-PREHOOK: query: drop table table1
-PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table table1
-POSTHOOK: type: DROPTABLE
-PREHOOK: query: drop table table2
-PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table table2
-POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table table1(key string, value string) clustered by (key, value)
-into 2 BUCKETS stored as textfile
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@table1
-POSTHOOK: query: create table table1(key string, value string) clustered by (key, value)
-into 2 BUCKETS stored as textfile
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@table1
-PREHOOK: query: create table table2(key string, value string) clustered by (value, key)
-into 2 BUCKETS stored as textfile
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@table2
-POSTHOOK: query: create table table2(key string, value string) clustered by (value, key)
-into 2 BUCKETS stored as textfile
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@table2
-PREHOOK: query: load data local inpath '../../data/files/bucket_files/000000_0' overwrite into table table1
-PREHOOK: type: LOAD
-#### A masked pattern was here ####
-PREHOOK: Output: default@table1
-POSTHOOK: query: load data local inpath '../../data/files/bucket_files/000000_0' overwrite into table table1
-POSTHOOK: type: LOAD
-#### A masked pattern was here ####
-POSTHOOK: Output: default@table1
-PREHOOK: query: load data local inpath '../../data/files/bucket_files/000000_0' overwrite into table table2
-PREHOOK: type: LOAD
-#### A masked pattern was here ####
-PREHOOK: Output: default@table2
-POSTHOOK: query: load data local inpath '../../data/files/bucket_files/000000_0' overwrite into table table2
-POSTHOOK: type: LOAD
-#### A masked pattern was here ####
-POSTHOOK: Output: default@table2
-PREHOOK: query: load data local inpath '../../data/files/bucket_files/000001_0' overwrite into table table2
-PREHOOK: type: LOAD
-#### A masked pattern was here ####
-PREHOOK: Output: default@table2
-POSTHOOK: query: load data local inpath '../../data/files/bucket_files/000001_0' overwrite into table table2
-POSTHOOK: type: LOAD
-#### A masked pattern was here ####
-POSTHOOK: Output: default@table2
-FAILED: SemanticException [Error 10141]: Bucketed table metadata is not correct. Fix the metadata or don't use bucketed mapjoin, by setting hive.enforce.bucketmapjoin to false. The number of buckets for table table1 is 2, whereas the number of files is 1
diff --git a/ql/src/test/results/clientnegative/bucket_mapjoin_wrong_table_metadata_2.q.out b/ql/src/test/results/clientnegative/bucket_mapjoin_wrong_table_metadata_2.q.out
deleted file mode 100644
index 1106d5d..0000000
--- a/ql/src/test/results/clientnegative/bucket_mapjoin_wrong_table_metadata_2.q.out
+++ /dev/null
@@ -1,71 +0,0 @@
-PREHOOK: query: drop table table1
-PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table table1
-POSTHOOK: type: DROPTABLE
-PREHOOK: query: drop table table2
-PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table table2
-POSTHOOK: type: DROPTABLE
-PREHOOK: query: create table table1(key string, value string) partitioned by (ds string) clustered by (key, value)
-into 2 BUCKETS stored as textfile
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@table1
-POSTHOOK: query: create table table1(key string, value string) partitioned by (ds string) clustered by (key, value)
-into 2 BUCKETS stored as textfile
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@table1
-PREHOOK: query: create table table2(key string, value string) clustered by (value, key)
-into 2 BUCKETS stored as textfile
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@table2
-POSTHOOK: query: create table table2(key string, value string) clustered by (value, key)
-into 2 BUCKETS stored as textfile
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@table2
-PREHOOK: query: load data local inpath '../../data/files/bucket_files/000000_0' overwrite into table table1 partition (ds='1')
-PREHOOK: type: LOAD
-#### A masked pattern was here ####
-PREHOOK: Output: default@table1
-POSTHOOK: query: load data local inpath '../../data/files/bucket_files/000000_0' overwrite into table table1 partition (ds='1')
-POSTHOOK: type: LOAD
-#### A masked pattern was here ####
-POSTHOOK: Output: default@table1
-POSTHOOK: Output: default@table1@ds=1
-PREHOOK: query: load data local inpath '../../data/files/bucket_files/000001_0' overwrite into table table1 partition (ds='1')
-PREHOOK: type: LOAD
-#### A masked pattern was here ####
-PREHOOK: Output: default@table1@ds=1
-POSTHOOK: query: load data local inpath '../../data/files/bucket_files/000001_0' overwrite into table table1 partition (ds='1')
-POSTHOOK: type: LOAD
-#### A masked pattern was here ####
-POSTHOOK: Output: default@table1@ds=1
-PREHOOK: query: load data local inpath '../../data/files/bucket_files/000000_0' overwrite into table table1 partition (ds='2')
-PREHOOK: type: LOAD
-#### A masked pattern was here ####
-PREHOOK: Output: default@table1
-POSTHOOK: query: load data local inpath '../../data/files/bucket_files/000000_0' overwrite into table table1 partition (ds='2')
-POSTHOOK: type: LOAD
-#### A masked pattern was here ####
-POSTHOOK: Output: default@table1
-POSTHOOK: Output: default@table1@ds=2
-PREHOOK: query: load data local inpath '../../data/files/bucket_files/000000_0' overwrite into table table2
-PREHOOK: type: LOAD
-#### A masked pattern was here ####
-PREHOOK: Output: default@table2
-POSTHOOK: query: load data local inpath '../../data/files/bucket_files/000000_0' overwrite into table table2
-POSTHOOK: type: LOAD
-#### A masked pattern was here ####
-POSTHOOK: Output: default@table2
-PREHOOK: query: load data local inpath '../../data/files/bucket_files/000001_0' overwrite into table table2
-PREHOOK: type: LOAD
-#### A masked pattern was here ####
-PREHOOK: Output: default@table2
-POSTHOOK: query: load data local inpath '../../data/files/bucket_files/000001_0' overwrite into table table2
-POSTHOOK: type: LOAD
-#### A masked pattern was here ####
-POSTHOOK: Output: default@table2
-FAILED: SemanticException [Error 10141]: Bucketed table metadata is not correct. Fix the metadata or don't use bucketed mapjoin, by setting hive.enforce.bucketmapjoin to false. The number of buckets for table table1 partition ds=1 is 2, whereas the number of files is 1
diff --git a/ql/src/test/results/clientnegative/cachingprintstream.q.out b/ql/src/test/results/clientnegative/cachingprintstream.q.out
index 0acb772..db6abc6 100644
--- a/ql/src/test/results/clientnegative/cachingprintstream.q.out
+++ b/ql/src/test/results/clientnegative/cachingprintstream.q.out
@@ -8,10 +8,88 @@ PREHOOK: query: FROM src SELECT TRANSFORM (key, value) USING 'FAKE_SCRIPT_SHOULD
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
+Status: Failed
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20000]: Unable to initialize custom script.
+#### A masked pattern was here ####
+Caused by: java.io.IOException: Cannot run program "FAKE_SCRIPT_SHOULD_NOT_EXIST": error=2, No such file or directory
+#### A masked pattern was here ####
+Caused by: java.io.IOException: error=2, No such file or directory
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20000]: Unable to initialize custom script.
+#### A masked pattern was here ####
+Caused by: java.io.IOException: Cannot run program "FAKE_SCRIPT_SHOULD_NOT_EXIST": error=2, No such file or directory
+#### A masked pattern was here ####
+Caused by: java.io.IOException: error=2, No such file or directory
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
 Begin cached logs.
 PREHOOK: query: FROM src SELECT TRANSFORM (key, value) USING 'FAKE_SCRIPT_SHOULD_NOT_EXIST' AS key, value
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
+Status: Failed
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20000]: Unable to initialize custom script.
+#### A masked pattern was here ####
+Caused by: java.io.IOException: Cannot run program "FAKE_SCRIPT_SHOULD_NOT_EXIST": error=2, No such file or directory
+#### A masked pattern was here ####
+Caused by: java.io.IOException: error=2, No such file or directory
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20000]: Unable to initialize custom script.
+#### A masked pattern was here ####
+Caused by: java.io.IOException: Cannot run program "FAKE_SCRIPT_SHOULD_NOT_EXIST": error=2, No such file or directory
+#### A masked pattern was here ####
+Caused by: java.io.IOException: error=2, No such file or directory
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
 End cached logs.
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20000]: Unable to initialize custom script.
+#### A masked pattern was here ####
+Caused by: java.io.IOException: Cannot run program "FAKE_SCRIPT_SHOULD_NOT_EXIST": error=2, No such file or directory
+#### A masked pattern was here ####
+Caused by: java.io.IOException: error=2, No such file or directory
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20000]: Unable to initialize custom script.
+#### A masked pattern was here ####
+Caused by: java.io.IOException: Cannot run program "FAKE_SCRIPT_SHOULD_NOT_EXIST": error=2, No such file or directory
+#### A masked pattern was here ####
+Caused by: java.io.IOException: error=2, No such file or directory
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
diff --git a/ql/src/test/results/clientnegative/check_constraint_tbl_level.q.out b/ql/src/test/results/clientnegative/check_constraint_tbl_level.q.out
index 6ab1f51..3b59664 100644
--- a/ql/src/test/results/clientnegative/check_constraint_tbl_level.q.out
+++ b/ql/src/test/results/clientnegative/check_constraint_tbl_level.q.out
@@ -10,5 +10,24 @@ PREHOOK: query: insert into tti values(1,2)
 PREHOOK: type: QUERY
 PREHOOK: Input: _dummy_database@_dummy_table
 PREHOOK: Output: default@tti
+Status: Failed
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Caused by: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+, errorMessage=Cannot recover from this error:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+, errorMessage=Cannot recover from this error:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
diff --git a/ql/src/test/results/clientnegative/check_constraint_violation.q.out b/ql/src/test/results/clientnegative/check_constraint_violation.q.out
index 9c86ad9..76f5a4d 100644
--- a/ql/src/test/results/clientnegative/check_constraint_violation.q.out
+++ b/ql/src/test/results/clientnegative/check_constraint_violation.q.out
@@ -10,5 +10,24 @@ PREHOOK: query: insert into tti values(5)
 PREHOOK: type: QUERY
 PREHOOK: Input: _dummy_database@_dummy_table
 PREHOOK: Output: default@tti
+Status: Failed
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Caused by: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+, errorMessage=Cannot recover from this error:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+, errorMessage=Cannot recover from this error:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
diff --git a/ql/src/test/results/clientnegative/cluster_tasklog_retrieval.q.out b/ql/src/test/results/clientnegative/cluster_tasklog_retrieval.q.out
index 7db7bfe..8ba4013 100644
--- a/ql/src/test/results/clientnegative/cluster_tasklog_retrieval.q.out
+++ b/ql/src/test/results/clientnegative/cluster_tasklog_retrieval.q.out
@@ -9,5 +9,9 @@ SELECT evaluate_npe(src.key) LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: hdfs://### HDFS PATH ###
-#### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+POSTHOOK: query: FROM src
+SELECT evaluate_npe(src.key) LIMIT 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: hdfs://### HDFS PATH ###
+Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: Error evaluating evaluate_npe(key)
diff --git a/ql/src/test/results/clientnegative/compute_bit_vector_fm_limit.q.out b/ql/src/test/results/clientnegative/compute_bit_vector_fm_limit.q.out
index 0341682..4b71956 100644
--- a/ql/src/test/results/clientnegative/compute_bit_vector_fm_limit.q.out
+++ b/ql/src/test/results/clientnegative/compute_bit_vector_fm_limit.q.out
@@ -18,4 +18,40 @@ PREHOOK: query: select compute_bit_vector_fm(a, 10000) from tab_int
 PREHOOK: type: QUERY
 PREHOOK: Input: default@tab_int
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Status: Failed
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: The maximum allowed value for number of bit vectors  is 1024, but was passed 10000 bit vectors
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: The maximum allowed value for number of bit vectors  is 1024, but was passed 10000 bit vectors
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: The maximum allowed value for number of bit vectors  is 1024, but was passed 10000 bit vectors
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: The maximum allowed value for number of bit vectors  is 1024, but was passed 10000 bit vectors
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
diff --git a/ql/src/test/results/clientnegative/compute_stats_long.q.out b/ql/src/test/results/clientnegative/compute_stats_long.q.out
index e6164eb..990a941 100644
--- a/ql/src/test/results/clientnegative/compute_stats_long.q.out
+++ b/ql/src/test/results/clientnegative/compute_stats_long.q.out
@@ -18,4 +18,40 @@ PREHOOK: query: select compute_stats(a, 'fm', 10000) from tab_int
 PREHOOK: type: QUERY
 PREHOOK: Input: default@tab_int
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Status: Failed
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: The maximum allowed value for number of bit vectors  is 1024, but was passed 10000 bit vectors
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: The maximum allowed value for number of bit vectors  is 1024, but was passed 10000 bit vectors
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: The maximum allowed value for number of bit vectors  is 1024, but was passed 10000 bit vectors
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: The maximum allowed value for number of bit vectors  is 1024, but was passed 10000 bit vectors
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
diff --git a/ql/src/test/results/clientnegative/dyn_part3.q.out b/ql/src/test/results/clientnegative/dyn_part3.q.out
index b9f1442..d3c5b68 100644
--- a/ql/src/test/results/clientnegative/dyn_part3.q.out
+++ b/ql/src/test/results/clientnegative/dyn_part3.q.out
@@ -10,5 +10,39 @@ PREHOOK: query: insert overwrite table nzhang_part partition(value) select key,
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@nzhang_part
+Status: Failed
+Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 1)
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 1)
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 1)
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveFatalException: [Error 20004]: Fatal error occurred when node tried to create too many dynamic partitions. The maximum number of dynamic partitions is controlled by hive.exec.max.dynamic.partitions and hive.exec.max.dynamic.partitions.pernode. Maximum was set to 100 partitions per node, number of dynamic partitions on this node: 101
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 1)
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 1)
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 1)
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveFatalException: [Error 20004]: Fatal error occurred when node tried to create too many dynamic partitions. The maximum number of dynamic partitions is controlled by hive.exec.max.dynamic.partitions and hive.exec.max.dynamic.partitions.pernode. Maximum was set to 100 partitions per node, number of dynamic partitions on this node: 101
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:1, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 1)
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 1)
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 1)
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveFatalException: [Error 20004]: Fatal error occurred when node tried to create too many dynamic partitions. The maximum number of dynamic partitions is controlled by hive.exec.max.dynamic.partitions and hive.exec.max.dynamic.partitions.pernode. Maximum was set to 100 partitions per node, number of dynamic partitions on this node: 101
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 1)
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 1)
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 1)
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveFatalException: [Error 20004]: Fatal error occurred when node tried to create too many dynamic partitions. The maximum number of dynamic partitions is controlled by hive.exec.max.dynamic.partitions and hive.exec.max.dynamic.partitions.pernode. Maximum was set to 100 partitions per node, number of dynamic partitions on this node: 101
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:1, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
diff --git a/ql/src/test/results/clientnegative/dyn_part_max_per_node.q.out b/ql/src/test/results/clientnegative/dyn_part_max_per_node.q.out
index 44d266c..09319b6 100644
--- a/ql/src/test/results/clientnegative/dyn_part_max_per_node.q.out
+++ b/ql/src/test/results/clientnegative/dyn_part_max_per_node.q.out
@@ -19,5 +19,39 @@ LIMIT 50
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@max_parts
+Status: Failed
+Vertex failed, vertexName=Reducer 3, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 2)
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 2)
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 2)
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveFatalException: [Error 20004]: Fatal error occurred when node tried to create too many dynamic partitions. The maximum number of dynamic partitions is controlled by hive.exec.max.dynamic.partitions and hive.exec.max.dynamic.partitions.pernode. Maximum was set to 10 partitions per node, number of dynamic partitions on this node: 11
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 2)
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 2)
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 2)
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveFatalException: [Error 20004]: Fatal error occurred when node tried to create too many dynamic partitions. The maximum number of dynamic partitions is controlled by hive.exec.max.dynamic.partitions and hive.exec.max.dynamic.partitions.pernode. Maximum was set to 10 partitions per node, number of dynamic partitions on this node: 11
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 3] killed/failed due to:OWN_TASK_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Reducer 3, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 2)
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 2)
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 2)
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveFatalException: [Error 20004]: Fatal error occurred when node tried to create too many dynamic partitions. The maximum number of dynamic partitions is controlled by hive.exec.max.dynamic.partitions and hive.exec.max.dynamic.partitions.pernode. Maximum was set to 10 partitions per node, number of dynamic partitions on this node: 11
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 2)
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 2)
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing vector batch (tag=0) (vectorizedVertexNum 2)
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveFatalException: [Error 20004]: Fatal error occurred when node tried to create too many dynamic partitions. The maximum number of dynamic partitions is controlled by hive.exec.max.dynamic.partitions and hive.exec.max.dynamic.partitions.pernode. Maximum was set to 10 partitions per node, number of dynamic partitions on this node: 11
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 3] killed/failed due to:OWN_TASK_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
diff --git a/ql/src/test/results/clientnegative/dynamic_partitions_with_whitelist.q.out b/ql/src/test/results/clientnegative/dynamic_partitions_with_whitelist.q.out
index a242366..a9ca39d 100644
--- a/ql/src/test/results/clientnegative/dynamic_partitions_with_whitelist.q.out
+++ b/ql/src/test/results/clientnegative/dynamic_partitions_with_whitelist.q.out
@@ -28,5 +28,32 @@ PREHOOK: type: QUERY
 PREHOOK: Input: default@source_table
 PREHOOK: Input: default@source_table@ds=2008-04-08/hr=11
 PREHOOK: Output: default@dest_table
+Status: Failed
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveFatalException: Partition value 'val_129' contains a character not matched by whitelist pattern '[^9]*'.  (configure with hive.metastore.partition.name.whitelist.pattern)
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveFatalException: Partition value 'val_129' contains a character not matched by whitelist pattern '[^9]*'.  (configure with hive.metastore.partition.name.whitelist.pattern)
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveFatalException: Partition value 'val_129' contains a character not matched by whitelist pattern '[^9]*'.  (configure with hive.metastore.partition.name.whitelist.pattern)
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveFatalException: Partition value 'val_129' contains a character not matched by whitelist pattern '[^9]*'.  (configure with hive.metastore.partition.name.whitelist.pattern)
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
diff --git a/ql/src/test/results/clientnegative/invalid_mapjoin1.q.out b/ql/src/test/results/clientnegative/invalid_mapjoin1.q.out
deleted file mode 100644
index 80a8713..0000000
--- a/ql/src/test/results/clientnegative/invalid_mapjoin1.q.out
+++ /dev/null
@@ -1 +0,0 @@
-FAILED: SemanticException [Error 10058]: All tables are specified as map-table for join [a, b]
diff --git a/ql/src/test/results/clientnegative/join2.q.out b/ql/src/test/results/clientnegative/join2.q.out
deleted file mode 100644
index b53b3a1..0000000
--- a/ql/src/test/results/clientnegative/join2.q.out
+++ /dev/null
@@ -1 +0,0 @@
-FAILED: SemanticException [Error 10057]: MAPJOIN cannot be performed with OUTER JOIN
diff --git a/ql/src/test/results/clientnegative/join28.q.out b/ql/src/test/results/clientnegative/join28.q.out
deleted file mode 100644
index e371fea..0000000
--- a/ql/src/test/results/clientnegative/join28.q.out
+++ /dev/null
@@ -1,9 +0,0 @@
-PREHOOK: query: CREATE TABLE dest_j1(key STRING, value STRING) STORED AS TEXTFILE
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@dest_j1
-POSTHOOK: query: CREATE TABLE dest_j1(key STRING, value STRING) STORED AS TEXTFILE
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@dest_j1
-FAILED: SemanticException [Error 10227]: Not all clauses are supported with mapjoin hint. Please remove mapjoin hint.
diff --git a/ql/src/test/results/clientnegative/join29.q.out b/ql/src/test/results/clientnegative/join29.q.out
deleted file mode 100644
index 4fdf554..0000000
--- a/ql/src/test/results/clientnegative/join29.q.out
+++ /dev/null
@@ -1,9 +0,0 @@
-PREHOOK: query: CREATE TABLE dest_j1(key STRING, cnt1 INT, cnt2 INT)
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@dest_j1
-POSTHOOK: query: CREATE TABLE dest_j1(key STRING, cnt1 INT, cnt2 INT)
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@dest_j1
-FAILED: SemanticException [Error 10227]: Not all clauses are supported with mapjoin hint. Please remove mapjoin hint.
diff --git a/ql/src/test/results/clientnegative/join32.q.out b/ql/src/test/results/clientnegative/join32.q.out
deleted file mode 100644
index 6281e28..0000000
--- a/ql/src/test/results/clientnegative/join32.q.out
+++ /dev/null
@@ -1,9 +0,0 @@
-PREHOOK: query: CREATE TABLE dest_j1(key STRING, value STRING, val2 STRING) STORED AS TEXTFILE
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@dest_j1
-POSTHOOK: query: CREATE TABLE dest_j1(key STRING, value STRING, val2 STRING) STORED AS TEXTFILE
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@dest_j1
-FAILED: SemanticException [Error 10227]: Not all clauses are supported with mapjoin hint. Please remove mapjoin hint.
diff --git a/ql/src/test/results/clientnegative/join35.q.out b/ql/src/test/results/clientnegative/join35.q.out
deleted file mode 100644
index 0488a83..0000000
--- a/ql/src/test/results/clientnegative/join35.q.out
+++ /dev/null
@@ -1,9 +0,0 @@
-PREHOOK: query: CREATE TABLE dest_j1(key STRING, value STRING, val2 INT) STORED AS TEXTFILE
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@dest_j1
-POSTHOOK: query: CREATE TABLE dest_j1(key STRING, value STRING, val2 INT) STORED AS TEXTFILE
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@dest_j1
-FAILED: SemanticException [Error 10227]: Not all clauses are supported with mapjoin hint. Please remove mapjoin hint.
diff --git a/ql/src/test/results/clientnegative/local_mapred_error_cache.q.out b/ql/src/test/results/clientnegative/local_mapred_error_cache.q.out
deleted file mode 100644
index 238f342..0000000
--- a/ql/src/test/results/clientnegative/local_mapred_error_cache.q.out
+++ /dev/null
@@ -1,6 +0,0 @@
-PREHOOK: query: FROM src SELECT TRANSFORM(key, value) USING 'python ../../data/scripts/cat_error.py' AS (key, value)
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: hdfs://### HDFS PATH ###
-#### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
diff --git a/ql/src/test/results/clientnegative/mapreduce_stack_trace.q.out b/ql/src/test/results/clientnegative/mapreduce_stack_trace.q.out
deleted file mode 100644
index 423df30..0000000
--- a/ql/src/test/results/clientnegative/mapreduce_stack_trace.q.out
+++ /dev/null
@@ -1,6 +0,0 @@
-PREHOOK: query: FROM src SELECT TRANSFORM(key, value) USING 'script_does_not_exist' AS (key, value)
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: hdfs://### HDFS PATH ###
-#### A masked pattern was here ####
-FAILED: Execution Error, return code 20000 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. Unable to initialize custom script.
diff --git a/ql/src/test/results/clientnegative/mapreduce_stack_trace_turnoff.q.out b/ql/src/test/results/clientnegative/mapreduce_stack_trace_turnoff.q.out
deleted file mode 100644
index 423df30..0000000
--- a/ql/src/test/results/clientnegative/mapreduce_stack_trace_turnoff.q.out
+++ /dev/null
@@ -1,6 +0,0 @@
-PREHOOK: query: FROM src SELECT TRANSFORM(key, value) USING 'script_does_not_exist' AS (key, value)
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: hdfs://### HDFS PATH ###
-#### A masked pattern was here ####
-FAILED: Execution Error, return code 20000 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. Unable to initialize custom script.
diff --git a/ql/src/test/results/clientnegative/masking_mv.q.out b/ql/src/test/results/clientnegative/masking_mv.q.out
index ac93247..b4928a7 100644
--- a/ql/src/test/results/clientnegative/masking_mv.q.out
+++ b/ql/src/test/results/clientnegative/masking_mv.q.out
@@ -28,85 +28,78 @@ POSTHOOK: Output: database:default
 POSTHOOK: Output: default@masking_test_view_n_mv
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
-  Stage-7 depends on stages: Stage-1 , consists of Stage-4, Stage-3, Stage-5
-  Stage-4
-  Stage-0 depends on stages: Stage-4, Stage-3, Stage-6
-  Stage-8 depends on stages: Stage-0
-  Stage-2 depends on stages: Stage-8
-  Stage-9 depends on stages: Stage-2
-  Stage-3
-  Stage-5
-  Stage-6 depends on stages: Stage-5
+  Stage-2 depends on stages: Stage-1
+  Stage-4 depends on stages: Stage-0, Stage-2
+  Stage-3 depends on stages: Stage-4
+  Stage-5 depends on stages: Stage-3
+  Stage-0 depends on stages: Stage-1
 
 STAGE PLANS:
   Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: masking_test_n_mv
-            Statistics: Num rows: 500 Data size: 2000 Basic stats: COMPLETE Column stats: COMPLETE
-            Select Operator
-              expressions: key (type: int)
-              outputColumnNames: _col0
-              Statistics: Num rows: 500 Data size: 2000 Basic stats: COMPLETE Column stats: COMPLETE
-              File Output Operator
-                compressed: false
-                Statistics: Num rows: 500 Data size: 2000 Basic stats: COMPLETE Column stats: COMPLETE
-                table:
-                    input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
-                    output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
-                    serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
-                    name: default.masking_test_view_n_mv
-              Select Operator
-                expressions: _col0 (type: int)
-                outputColumnNames: col1
-                Statistics: Num rows: 500 Data size: 2000 Basic stats: COMPLETE Column stats: COMPLETE
-                Group By Operator
-                  aggregations: min(col1), max(col1), count(1), count(col1), compute_bit_vector_hll(col1)
-                  minReductionHashAggr: 0.99
-                  mode: hash
-                  outputColumnNames: _col0, _col1, _col2, _col3, _col4
-                  Statistics: Num rows: 1 Data size: 168 Basic stats: COMPLETE Column stats: COMPLETE
-                  Reduce Output Operator
-                    null sort order: 
-                    sort order: 
-                    Statistics: Num rows: 1 Data size: 168 Basic stats: COMPLETE Column stats: COMPLETE
-                    value expressions: _col0 (type: int), _col1 (type: int), _col2 (type: bigint), _col3 (type: bigint), _col4 (type: binary)
-      Execution mode: vectorized
-      Reduce Operator Tree:
-        Group By Operator
-          aggregations: min(VALUE._col0), max(VALUE._col1), count(VALUE._col2), count(VALUE._col3), compute_bit_vector_hll(VALUE._col4)
-          mode: mergepartial
-          outputColumnNames: _col0, _col1, _col2, _col3, _col4
-          Statistics: Num rows: 1 Data size: 168 Basic stats: COMPLETE Column stats: COMPLETE
-          Select Operator
-            expressions: 'LONG' (type: string), UDFToLong(_col0) (type: bigint), UDFToLong(_col1) (type: bigint), (_col2 - _col3) (type: bigint), COALESCE(ndv_compute_bit_vector(_col4),0) (type: bigint), _col4 (type: binary)
-            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
-            Statistics: Num rows: 1 Data size: 264 Basic stats: COMPLETE Column stats: COMPLETE
-            File Output Operator
-              compressed: false
-              Statistics: Num rows: 1 Data size: 264 Basic stats: COMPLETE Column stats: COMPLETE
-              table:
-                  input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                  output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                  serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-7
-    Conditional Operator
-
-  Stage: Stage-4
-    Move Operator
-      files:
-          hdfs directory: true
+    Tez
 #### A masked pattern was here ####
-
-  Stage: Stage-0
-    Move Operator
-      files:
-          hdfs directory: true
+      Edges:
+        Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
 #### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: masking_test_n_mv
+                  Statistics: Num rows: 500 Data size: 2000 Basic stats: COMPLETE Column stats: COMPLETE
+                  Select Operator
+                    expressions: key (type: int)
+                    outputColumnNames: _col0
+                    Statistics: Num rows: 500 Data size: 2000 Basic stats: COMPLETE Column stats: COMPLETE
+                    File Output Operator
+                      compressed: false
+                      Statistics: Num rows: 500 Data size: 2000 Basic stats: COMPLETE Column stats: COMPLETE
+                      table:
+                          input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
+                          output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
+                          serde: org.apache.hadoop.hive.ql.io.orc.OrcSerde
+                          name: default.masking_test_view_n_mv
+                    Select Operator
+                      expressions: _col0 (type: int)
+                      outputColumnNames: col1
+                      Statistics: Num rows: 500 Data size: 2000 Basic stats: COMPLETE Column stats: COMPLETE
+                      Group By Operator
+                        aggregations: min(col1), max(col1), count(1), count(col1), compute_bit_vector_hll(col1)
+                        minReductionHashAggr: 0.99
+                        mode: hash
+                        outputColumnNames: _col0, _col1, _col2, _col3, _col4
+                        Statistics: Num rows: 1 Data size: 168 Basic stats: COMPLETE Column stats: COMPLETE
+                        Reduce Output Operator
+                          null sort order: 
+                          sort order: 
+                          Statistics: Num rows: 1 Data size: 168 Basic stats: COMPLETE Column stats: COMPLETE
+                          value expressions: _col0 (type: int), _col1 (type: int), _col2 (type: bigint), _col3 (type: bigint), _col4 (type: binary)
+            Execution mode: vectorized, llap
+            LLAP IO: may be used (ACID table)
+        Reducer 2 
+            Execution mode: vectorized, llap
+            Reduce Operator Tree:
+              Group By Operator
+                aggregations: min(VALUE._col0), max(VALUE._col1), count(VALUE._col2), count(VALUE._col3), compute_bit_vector_hll(VALUE._col4)
+                mode: mergepartial
+                outputColumnNames: _col0, _col1, _col2, _col3, _col4
+                Statistics: Num rows: 1 Data size: 168 Basic stats: COMPLETE Column stats: COMPLETE
+                Select Operator
+                  expressions: 'LONG' (type: string), UDFToLong(_col0) (type: bigint), UDFToLong(_col1) (type: bigint), (_col2 - _col3) (type: bigint), COALESCE(ndv_compute_bit_vector(_col4),0) (type: bigint), _col4 (type: binary)
+                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
+                  Statistics: Num rows: 1 Data size: 264 Basic stats: COMPLETE Column stats: COMPLETE
+                  File Output Operator
+                    compressed: false
+                    Statistics: Num rows: 1 Data size: 264 Basic stats: COMPLETE Column stats: COMPLETE
+                    table:
+                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
-  Stage: Stage-8
+  Stage: Stage-2
+    Dependency Collection
+
+  Stage: Stage-4
     Create Materialized View
       columns: key int
       expanded text: select `masking_test_n_mv`.`key` from `default`.`masking_test_n_mv`
@@ -114,7 +107,7 @@ STAGE PLANS:
       original text: select key from masking_test_n_mv
       rewrite enabled: true
 
-  Stage: Stage-2
+  Stage: Stage-3
     Stats Work
       Basic Stats Work:
       Column Stats Desc:
@@ -122,26 +115,12 @@ STAGE PLANS:
           Column Types: int
           Table: default.masking_test_view_n_mv
 
-  Stage: Stage-9
+  Stage: Stage-5
     Materialized View Update
       name: default.masking_test_view_n_mv
       retrieve and include: true
 
-  Stage: Stage-3
-    Merge File Operator
-      Map Operator Tree:
-          ORC File Merge Operator
-      merge level: stripe
-      input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
-
-  Stage: Stage-5
-    Merge File Operator
-      Map Operator Tree:
-          ORC File Merge Operator
-      merge level: stripe
-      input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
-
-  Stage: Stage-6
+  Stage: Stage-0
     Move Operator
       files:
           hdfs directory: true
diff --git a/ql/src/test/results/clientnegative/materialized_view_no_supported_op_rewrite_2.q.out b/ql/src/test/results/clientnegative/materialized_view_no_supported_op_rewrite_2.q.out
index 135d89b..cd2adbb 100644
--- a/ql/src/test/results/clientnegative/materialized_view_no_supported_op_rewrite_2.q.out
+++ b/ql/src/test/results/clientnegative/materialized_view_no_supported_op_rewrite_2.q.out
@@ -19,7 +19,7 @@ POSTHOOK: Output: default@cmv_basetable
 POSTHOOK: Lineage: cmv_basetable.a SCRIPT []
 POSTHOOK: Lineage: cmv_basetable.b SCRIPT []
 POSTHOOK: Lineage: cmv_basetable.c SCRIPT []
-Warning: Shuffle Join JOIN[6][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
+Warning: Shuffle Join MERGEJOIN[19][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
 PREHOOK: query: create materialized view cmv_mat_view disable rewrite as select t1.a from cmv_basetable t1 left outer join cmv_basetable t2 on (t1.a = t1.b)
 PREHOOK: type: CREATE_MATERIALIZED_VIEW
 PREHOOK: Input: default@cmv_basetable
diff --git a/ql/src/test/results/clientnegative/merge_constraint_notnull.q.out b/ql/src/test/results/clientnegative/merge_constraint_notnull.q.out
index 088e249..3e48d1f 100644
--- a/ql/src/test/results/clientnegative/merge_constraint_notnull.q.out
+++ b/ql/src/test/results/clientnegative/merge_constraint_notnull.q.out
@@ -51,5 +51,28 @@ PREHOOK: Output: default@merge_tmp_table
 PREHOOK: Output: default@testt
 PREHOOK: Output: default@testt
 PREHOOK: Output: default@testt
+Status: Failed
+Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Caused by: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:5
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.errors.DataConstraintViolationError: Either CHECK or NOT NULL constraint violated!
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:5
diff --git a/ql/src/test/results/clientnegative/minimr_broken_pipe.q.out b/ql/src/test/results/clientnegative/minimr_broken_pipe.q.out
deleted file mode 100644
index d0d83de..0000000
--- a/ql/src/test/results/clientnegative/minimr_broken_pipe.q.out
+++ /dev/null
@@ -1,6 +0,0 @@
-PREHOOK: query: SELECT TRANSFORM(*) USING 'true' AS a, b FROM (SELECT TRANSFORM(*) USING 'echo' AS a, b FROM src LIMIT 1) tmp
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: hdfs://### HDFS PATH ###
-#### A masked pattern was here ####
-FAILED: Execution Error, return code 20003 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. An error occurred when trying to close the Operator running your custom script.
diff --git a/ql/src/test/results/clientnegative/script_broken_pipe2.q.out b/ql/src/test/results/clientnegative/script_broken_pipe2.q.out
index 2202bf0..cdc9843 100644
--- a/ql/src/test/results/clientnegative/script_broken_pipe2.q.out
+++ b/ql/src/test/results/clientnegative/script_broken_pipe2.q.out
@@ -2,4 +2,47 @@ PREHOOK: query: SELECT TRANSFORM(key, value, key, value, key, value, key, value,
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Status: Failed
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20001]: An error occurred while reading or writing to your custom script. It may have crashed with an error.
+#### A masked pattern was here ####
+Caused by: java.io.IOException: Stream closed
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20001]: An error occurred while reading or writing to your custom script. It may have crashed with an error.
+#### A masked pattern was here ####
+Caused by: java.io.IOException: Stream closed
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20001]: An error occurred while reading or writing to your custom script. It may have crashed with an error.
+#### A masked pattern was here ####
+Caused by: java.io.IOException: Stream closed
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20001]: An error occurred while reading or writing to your custom script. It may have crashed with an error.
+#### A masked pattern was here ####
+Caused by: java.io.IOException: Stream closed
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
diff --git a/ql/src/test/results/clientnegative/script_broken_pipe3.q.out b/ql/src/test/results/clientnegative/script_broken_pipe3.q.out
index 21415a6..2ef4328 100644
--- a/ql/src/test/results/clientnegative/script_broken_pipe3.q.out
+++ b/ql/src/test/results/clientnegative/script_broken_pipe3.q.out
@@ -1,5 +1,32 @@
-PREHOOK: query: SELECT TRANSFORM(*) USING 'false' AS a, b FROM (SELECT TRANSFORM(*) USING 'echo' AS a, b FROM src LIMIT 1) tmp
+PREHOOK: query: SELECT TRANSFORM(*) USING 'false' AS a, b FROM (SELECT TRANSFORM(*) USING 'echo' AS a, b FROM src LIMIT 2) tmp
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Status: Failed
+Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
diff --git a/ql/src/test/results/clientnegative/script_error.q.out b/ql/src/test/results/clientnegative/script_error.q.out
index 69e4b21..00b1ac2 100644
--- a/ql/src/test/results/clientnegative/script_error.q.out
+++ b/ql/src/test/results/clientnegative/script_error.q.out
@@ -16,29 +16,32 @@ STAGE DEPENDENCIES:
 
 STAGE PLANS:
   Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: src
-            Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
-            Select Operator
-              expressions: key (type: string), value (type: string)
-              outputColumnNames: _col0, _col1
-              Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
-              Transform Operator
-                command: ../../data/scripts/error_script
-                output info:
-                    input format: org.apache.hadoop.mapred.TextInputFormat
-                    output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
-                    serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-                Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
-                File Output Operator
-                  compressed: false
+    Tez
+#### A masked pattern was here ####
+      Vertices:
+        Map 1 
+            Map Operator Tree:
+                TableScan
+                  alias: src
                   Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
-                  table:
-                      input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                  Select Operator
+                    expressions: key (type: string), value (type: string)
+                    outputColumnNames: _col0, _col1
+                    Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
+                    Transform Operator
+                      command: ../../data/scripts/error_script
+                      output info:
+                          input format: org.apache.hadoop.mapred.TextInputFormat
+                          output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
+                          serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+                      Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
+                      File Output Operator
+                        compressed: false
+                        Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE
+                        table:
+                            input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                            output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                            serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
 
   Stage: Stage-0
     Fetch Operator
@@ -51,4 +54,31 @@ FROM src
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Status: Failed
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20003]: An error occurred when trying to close the Operator running your custom script.
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
diff --git a/ql/src/test/results/clientnegative/serde_regex2.q.out b/ql/src/test/results/clientnegative/serde_regex2.q.out
index b0703fb..9af29ff 100644
--- a/ql/src/test/results/clientnegative/serde_regex2.q.out
+++ b/ql/src/test/results/clientnegative/serde_regex2.q.out
@@ -60,4 +60,48 @@ PREHOOK: query: SELECT * FROM serde_regex ORDER BY `time`
 PREHOOK: type: QUERY
 PREHOOK: Input: default@serde_regex
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Status: Failed
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: java.io.IOException: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.io.IOException: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+Caused by: java.io.IOException: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+Caused by: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: java.io.IOException: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.io.IOException: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+Caused by: java.io.IOException: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+Caused by: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: java.io.IOException: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match [...]
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.io.IOException: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+Caused by: java.io.IOException: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+Caused by: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: java.io.IOException: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.io.IOException: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+Caused by: java.io.IOException: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+Caused by: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.serde2.SerDeException: Number of matching groups doesn't match the number of columns
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
diff --git a/ql/src/test/results/clientnegative/smb_bucketmapjoin.q.out b/ql/src/test/results/clientnegative/smb_bucketmapjoin.q.out
deleted file mode 100644
index 23938d2..0000000
--- a/ql/src/test/results/clientnegative/smb_bucketmapjoin.q.out
+++ /dev/null
@@ -1,41 +0,0 @@
-PREHOOK: query: CREATE TABLE smb_bucket4_1(key int, value string) CLUSTERED BY (key) INTO 2 BUCKETS
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@smb_bucket4_1
-POSTHOOK: query: CREATE TABLE smb_bucket4_1(key int, value string) CLUSTERED BY (key) INTO 2 BUCKETS
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@smb_bucket4_1
-PREHOOK: query: CREATE TABLE smb_bucket4_2(key int, value string) CLUSTERED BY (key) INTO 2 BUCKETS
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@smb_bucket4_2
-POSTHOOK: query: CREATE TABLE smb_bucket4_2(key int, value string) CLUSTERED BY (key) INTO 2 BUCKETS
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@smb_bucket4_2
-PREHOOK: query: insert overwrite table smb_bucket4_1
-select * from src
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@smb_bucket4_1
-POSTHOOK: query: insert overwrite table smb_bucket4_1
-select * from src
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@smb_bucket4_1
-POSTHOOK: Lineage: smb_bucket4_1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: smb_bucket4_1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-PREHOOK: query: insert overwrite table smb_bucket4_2
-select * from src
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@smb_bucket4_2
-POSTHOOK: query: insert overwrite table smb_bucket4_2
-select * from src
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@smb_bucket4_2
-POSTHOOK: Lineage: smb_bucket4_2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: smb_bucket4_2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-FAILED: SemanticException [Error 10246]: b table chosen for streaming is not valid
diff --git a/ql/src/test/results/clientnegative/smb_mapjoin_14.q.out b/ql/src/test/results/clientnegative/smb_mapjoin_14.q.out
deleted file mode 100644
index de32df3..0000000
--- a/ql/src/test/results/clientnegative/smb_mapjoin_14.q.out
+++ /dev/null
@@ -1,41 +0,0 @@
-PREHOOK: query: CREATE TABLE tbl1(key int, value string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@tbl1
-POSTHOOK: query: CREATE TABLE tbl1(key int, value string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@tbl1
-PREHOOK: query: CREATE TABLE tbl2(key int, value string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@tbl2
-POSTHOOK: query: CREATE TABLE tbl2(key int, value string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@tbl2
-PREHOOK: query: insert overwrite table tbl1
-select * from src where key < 10
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@tbl1
-POSTHOOK: query: insert overwrite table tbl1
-select * from src where key < 10
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@tbl1
-POSTHOOK: Lineage: tbl1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: tbl1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-PREHOOK: query: insert overwrite table tbl2
-select * from src where key < 10
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@tbl2
-POSTHOOK: query: insert overwrite table tbl2
-select * from src where key < 10
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@tbl2
-POSTHOOK: Lineage: tbl2.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: tbl2.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-FAILED: SemanticException [Error 10227]: Not all clauses are supported with mapjoin hint. Please remove mapjoin hint.
diff --git a/ql/src/test/results/clientnegative/sortmerge_mapjoin_mismatch_1.q.out b/ql/src/test/results/clientnegative/sortmerge_mapjoin_mismatch_1.q.out
deleted file mode 100644
index ceebca2..0000000
--- a/ql/src/test/results/clientnegative/sortmerge_mapjoin_mismatch_1.q.out
+++ /dev/null
@@ -1,118 +0,0 @@
-PREHOOK: query: create table table_asc(key int, value string) CLUSTERED BY (key) SORTED BY (key asc) 
-INTO 1 BUCKETS STORED AS RCFILE
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@table_asc
-POSTHOOK: query: create table table_asc(key int, value string) CLUSTERED BY (key) SORTED BY (key asc) 
-INTO 1 BUCKETS STORED AS RCFILE
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@table_asc
-PREHOOK: query: create table table_desc(key int, value string) CLUSTERED BY (key) SORTED BY (key desc) 
-INTO 1 BUCKETS STORED AS RCFILE
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@table_desc
-POSTHOOK: query: create table table_desc(key int, value string) CLUSTERED BY (key) SORTED BY (key desc) 
-INTO 1 BUCKETS STORED AS RCFILE
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@table_desc
-PREHOOK: query: insert overwrite table table_asc select key, value from src
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@table_asc
-POSTHOOK: query: insert overwrite table table_asc select key, value from src
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@table_asc
-POSTHOOK: Lineage: table_asc.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: table_asc.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-PREHOOK: query: insert overwrite table table_desc select key, value from src
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@table_desc
-POSTHOOK: query: insert overwrite table table_desc select key, value from src
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@table_desc
-POSTHOOK: Lineage: table_desc.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: table_desc.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-PREHOOK: query: explain 
-select /*+mapjoin(a)*/ * from table_asc a join table_desc b on a.key = b.key
-PREHOOK: type: QUERY
-PREHOOK: Input: default@table_asc
-PREHOOK: Input: default@table_desc
-#### A masked pattern was here ####
-POSTHOOK: query: explain 
-select /*+mapjoin(a)*/ * from table_asc a join table_desc b on a.key = b.key
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@table_asc
-POSTHOOK: Input: default@table_desc
-#### A masked pattern was here ####
-STAGE DEPENDENCIES:
-  Stage-3 is a root stage
-  Stage-1 depends on stages: Stage-3
-  Stage-0 depends on stages: Stage-1
-
-STAGE PLANS:
-  Stage: Stage-3
-    Map Reduce Local Work
-      Alias -> Map Local Tables:
-        a 
-          Fetch Operator
-            limit: -1
-      Alias -> Map Local Operator Tree:
-        a 
-          TableScan
-            alias: a
-            filterExpr: key is not null (type: boolean)
-            Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
-            Filter Operator
-              predicate: key is not null (type: boolean)
-              Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
-              HashTable Sink Operator
-                keys:
-                  0 key (type: int)
-                  1 key (type: int)
-
-  Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: b
-            filterExpr: key is not null (type: boolean)
-            Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
-            Filter Operator
-              predicate: key is not null (type: boolean)
-              Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE
-              Map Join Operator
-                condition map:
-                     Inner Join 0 to 1
-                keys:
-                  0 key (type: int)
-                  1 key (type: int)
-                outputColumnNames: _col0, _col1, _col5, _col6
-                Statistics: Num rows: 550 Data size: 52250 Basic stats: COMPLETE Column stats: NONE
-                Select Operator
-                  expressions: _col0 (type: int), _col1 (type: string), _col5 (type: int), _col6 (type: string)
-                  outputColumnNames: _col0, _col1, _col2, _col3
-                  Statistics: Num rows: 550 Data size: 52250 Basic stats: COMPLETE Column stats: NONE
-                  File Output Operator
-                    compressed: false
-                    Statistics: Num rows: 550 Data size: 52250 Basic stats: COMPLETE Column stats: NONE
-                    table:
-                        input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                        output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-      Execution mode: vectorized
-      Local Work:
-        Map Reduce Local Work
-
-  Stage: Stage-0
-    Fetch Operator
-      limit: -1
-      Processor Tree:
-        ListSink
-
-FAILED: SemanticException [Error 10135]: Sort merge bucketed join could not be performed. If you really want to perform the operation, either set hive.optimize.bucketmapjoin.sortedmerge=false, or set hive.enforce.sortmergebucketmapjoin=false.
diff --git a/ql/src/test/results/clientnegative/split_sample_out_of_range.q.out b/ql/src/test/results/clientnegative/split_sample_out_of_range.q.out
index 54974a7..37f120c 100644
--- a/ql/src/test/results/clientnegative/split_sample_out_of_range.q.out
+++ b/ql/src/test/results/clientnegative/split_sample_out_of_range.q.out
@@ -1 +1 @@
-FAILED: SemanticException 3:32 Sampling percentage should be between 0 and 100. Error encountered near token '105'
+FAILED: SemanticException 3:32 Percentage sampling is not supported in org.apache.hadoop.hive.ql.io.HiveInputFormat. Error encountered near token '105'
diff --git a/ql/src/test/results/clientnegative/stack_trace.q.out b/ql/src/test/results/clientnegative/stack_trace.q.out
new file mode 100644
index 0000000..73fef35
--- /dev/null
+++ b/ql/src/test/results/clientnegative/stack_trace.q.out
@@ -0,0 +1,56 @@
+PREHOOK: query: FROM src SELECT TRANSFORM(key, value) USING 'script_does_not_exist' AS (key, value)
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: hdfs://### HDFS PATH ###
+Status: Failed
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20000]: Unable to initialize custom script.
+#### A masked pattern was here ####
+Caused by: java.io.IOException: Cannot run program "script_does_not_exist": error=2, No such file or directory
+#### A masked pattern was here ####
+Caused by: java.io.IOException: error=2, No such file or directory
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20000]: Unable to initialize custom script.
+#### A masked pattern was here ####
+Caused by: java.io.IOException: Cannot run program "script_does_not_exist": error=2, No such file or directory
+#### A masked pattern was here ####
+Caused by: java.io.IOException: error=2, No such file or directory
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20000]: Unable to initialize custom script.
+#### A masked pattern was here ####
+Caused by: java.io.IOException: Cannot run program "script_does_not_exist": error=2, No such file or directory
+#### A masked pattern was here ####
+Caused by: java.io.IOException: error=2, No such file or directory
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 20000]: Unable to initialize custom script.
+#### A masked pattern was here ####
+Caused by: java.io.IOException: Cannot run program "script_does_not_exist": error=2, No such file or directory
+#### A masked pattern was here ####
+Caused by: java.io.IOException: error=2, No such file or directory
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
diff --git a/ql/src/test/results/clientnegative/stats_aggregator_error_2.q.out b/ql/src/test/results/clientnegative/stats_aggregator_error_2.q.out
index 70d2ee4..129577c 100644
--- a/ql/src/test/results/clientnegative/stats_aggregator_error_2.q.out
+++ b/ql/src/test/results/clientnegative/stats_aggregator_error_2.q.out
@@ -21,5 +21,32 @@ PREHOOK: query: INSERT OVERWRITE TABLE tmptable select * from src
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@tmptable
+Status: Failed
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 30000]: StatsPublisher cannot be obtained. There was a error to retrieve the StatsPublisher, and retrying might help. If you dont want the query to fail because accurate statistics could not be collected, set hive.stats.reliable=false
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 30000]: StatsPublisher cannot be obtained. There was a error to retrieve the StatsPublisher, and retrying might help. If you dont want the query to fail because accurate statistics could not be collected, set hive.stats.reliable=false
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 30000]: StatsPublisher cannot be obtained. There was a error to retrieve the StatsPublisher, and retrying might help. If you dont want the query to fail because accurate statistics could not be collected, set hive.stats.reliable=false
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 30000]: StatsPublisher cannot be obtained. There was a error to retrieve the StatsPublisher, and retrying might help. If you dont want the query to fail because accurate statistics could not be collected, set hive.stats.reliable=false
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
diff --git a/ql/src/test/results/clientnegative/stats_publisher_error_1.q.out b/ql/src/test/results/clientnegative/stats_publisher_error_1.q.out
index 91f9090..863d689 100644
--- a/ql/src/test/results/clientnegative/stats_publisher_error_1.q.out
+++ b/ql/src/test/results/clientnegative/stats_publisher_error_1.q.out
@@ -20,5 +20,32 @@ PREHOOK: query: INSERT OVERWRITE TABLE tmptable select * from src
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@tmptable
+Status: Failed
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 30002]: StatsPublisher cannot be connected to.There was a error while connecting to the StatsPublisher, and retrying might help. If you dont want the query to fail because accurate statistics could not be collected, set hive.stats.reliable=false
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 30002]: StatsPublisher cannot be connected to.There was a error while connecting to the StatsPublisher, and retrying might help. If you dont want the query to fail because accurate statistics could not be collected, set hive.stats.reliable=false
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 30002]: StatsPublisher cannot be connected to.There was a error while connecting to the StatsPublisher, and retrying might help. If you dont want the query to fail because accurate statistics could not be collected, set hive.stats.reliable=false
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 30002]: StatsPublisher cannot be connected to.There was a error while connecting to the StatsPublisher, and retrying might help. If you dont want the query to fail because accurate statistics could not be collected, set hive.stats.reliable=false
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
diff --git a/ql/src/test/results/clientnegative/stats_publisher_error_2.q.out b/ql/src/test/results/clientnegative/stats_publisher_error_2.q.out
index 70d2ee4..129577c 100644
--- a/ql/src/test/results/clientnegative/stats_publisher_error_2.q.out
+++ b/ql/src/test/results/clientnegative/stats_publisher_error_2.q.out
@@ -21,5 +21,32 @@ PREHOOK: query: INSERT OVERWRITE TABLE tmptable select * from src
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 PREHOOK: Output: default@tmptable
+Status: Failed
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 30000]: StatsPublisher cannot be obtained. There was a error to retrieve the StatsPublisher, and retrying might help. If you dont want the query to fail because accurate statistics could not be collected, set hive.stats.reliable=false
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 30000]: StatsPublisher cannot be obtained. There was a error to retrieve the StatsPublisher, and retrying might help. If you dont want the query to fail because accurate statistics could not be collected, set hive.stats.reliable=false
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 30000]: StatsPublisher cannot be obtained. There was a error to retrieve the StatsPublisher, and retrying might help. If you dont want the query to fail because accurate statistics could not be collected, set hive.stats.reliable=false
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: [Error 30000]: StatsPublisher cannot be obtained. There was a error to retrieve the StatsPublisher, and retrying might help. If you dont want the query to fail because accurate statistics could not be collected, set hive.stats.reliable=false
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
diff --git a/ql/src/test/results/clientnegative/subquery_corr_in_agg.q.out b/ql/src/test/results/clientnegative/subquery_corr_in_agg.q.out
index ff17cd0..2649b8f 100644
--- a/ql/src/test/results/clientnegative/subquery_corr_in_agg.q.out
+++ b/ql/src/test/results/clientnegative/subquery_corr_in_agg.q.out
@@ -40,4 +40,40 @@ PREHOOK: type: QUERY
 PREHOOK: Input: default@part1
 PREHOOK: Input: default@supply
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Status: Failed
+Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  IN/NOT IN subquery with aggregate returning zero result. Currently this is not supported.
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  IN/NOT IN subquery with aggregate returning zero result. Currently this is not supported.
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  IN/NOT IN subquery with aggregate returning zero result. Currently this is not supported.
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  IN/NOT IN subquery with aggregate returning zero result. Currently this is not supported.
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
diff --git a/ql/src/test/results/clientnegative/subquery_in_implicit_gby.q.out b/ql/src/test/results/clientnegative/subquery_in_implicit_gby.q.out
index 5dc55c4..07cbae4 100644
--- a/ql/src/test/results/clientnegative/subquery_in_implicit_gby.q.out
+++ b/ql/src/test/results/clientnegative/subquery_in_implicit_gby.q.out
@@ -39,4 +39,40 @@ PREHOOK: type: QUERY
 PREHOOK: Input: default@t
 PREHOOK: Input: default@tt
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Status: Failed
+Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  IN/NOT IN subquery with aggregate returning zero result. Currently this is not supported.
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  IN/NOT IN subquery with aggregate returning zero result. Currently this is not supported.
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  IN/NOT IN subquery with aggregate returning zero result. Currently this is not supported.
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  IN/NOT IN subquery with aggregate returning zero result. Currently this is not supported.
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:1
diff --git a/ql/src/test/results/clientnegative/subquery_notin_implicit_gby.q.out b/ql/src/test/results/clientnegative/subquery_notin_implicit_gby.q.out
index db6d0a6..2cc9f4c 100644
--- a/ql/src/test/results/clientnegative/subquery_notin_implicit_gby.q.out
+++ b/ql/src/test/results/clientnegative/subquery_notin_implicit_gby.q.out
@@ -39,4 +39,41 @@ PREHOOK: type: QUERY
 PREHOOK: Input: default@t
 PREHOOK: Input: default@tt
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Status: Failed
+Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  IN/NOT IN subquery with aggregate returning zero result. Currently this is not supported.
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  IN/NOT IN subquery with aggregate returning zero result. Currently this is not supported.
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:2
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  IN/NOT IN subquery with aggregate returning zero result. Currently this is not supported.
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  IN/NOT IN subquery with aggregate returning zero result. Currently this is not supported.
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:2
diff --git a/ql/src/test/results/clientnegative/subquery_scalar_corr_multi_rows.q.out b/ql/src/test/results/clientnegative/subquery_scalar_corr_multi_rows.q.out
index 8377085..842e6a5 100644
--- a/ql/src/test/results/clientnegative/subquery_scalar_corr_multi_rows.q.out
+++ b/ql/src/test/results/clientnegative/subquery_scalar_corr_multi_rows.q.out
@@ -3,4 +3,41 @@ PREHOOK: query: select * from part where p_size >
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Status: Failed
+Vertex failed, vertexName=Reducer 4, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 4] killed/failed due to:OWN_TASK_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:2
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Reducer 4, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 4] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:2
diff --git a/ql/src/test/results/clientnegative/subquery_scalar_multi_rows.q.out b/ql/src/test/results/clientnegative/subquery_scalar_multi_rows.q.out
index 7ca260c..7d90f4d 100644
--- a/ql/src/test/results/clientnegative/subquery_scalar_multi_rows.q.out
+++ b/ql/src/test/results/clientnegative/subquery_scalar_multi_rows.q.out
@@ -1,7 +1,52 @@
-Warning: Shuffle Join JOIN[19][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Stage-2:MAPRED' is a cross product
-Warning: Shuffle Join JOIN[16][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product
+Warning: Shuffle Join MERGEJOIN[27][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
+Warning: Shuffle Join MERGEJOIN[28][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Reducer 3' is a cross product
 PREHOOK: query: select p_name from part where p_size > (select p_size from part)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@part
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Status: Failed
+Vertex failed, vertexName=Reducer 4, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 4] killed/failed due to:OWN_TASK_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+[Masked Vertex killed due to OTHER_VERTEX_FAILURE]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:2
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Reducer 4, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException [...]
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException:  Scalar subquery expression returns more than one row.
+#### A masked pattern was here ####
+]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 4] killed/failed due to:OWN_TASK_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE][Masked Vertex killed due to OTHER_VERTEX_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:2
diff --git a/ql/src/test/results/clientnegative/udf_assert_true.q.out b/ql/src/test/results/clientnegative/udf_assert_true.q.out
index 99d7a3b..513f1bc 100644
--- a/ql/src/test/results/clientnegative/udf_assert_true.q.out
+++ b/ql/src/test/results/clientnegative/udf_assert_true.q.out
@@ -12,67 +12,38 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-0 depends on stages: Stage-1
+  Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: src
-            Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
-            Lateral View Forward
-              Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
-              Select Operator
-                Statistics: Num rows: 500 Data size: 172000 Basic stats: COMPLETE Column stats: COMPLETE
+  Stage: Stage-0
+    Fetch Operator
+      limit: 2
+      Processor Tree:
+        TableScan
+          alias: src
+          Lateral View Forward
+            Select Operator
+              Lateral View Join Operator
+                outputColumnNames: _col5
+                Limit
+                  Number of rows: 2
+                  Select Operator
+                    expressions: assert_true((_col5 > 0)) (type: void)
+                    outputColumnNames: _col0
+                    ListSink
+            Select Operator
+              expressions: array(1,2) (type: array<int>)
+              outputColumnNames: _col0
+              UDTF Operator
+                function name: explode
                 Lateral View Join Operator
                   outputColumnNames: _col5
-                  Statistics: Num rows: 500 Data size: 196000 Basic stats: COMPLETE Column stats: COMPLETE
                   Limit
                     Number of rows: 2
-                    Statistics: Num rows: 2 Data size: 536 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: assert_true((_col5 > 0)) (type: void)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                      File Output Operator
-                        compressed: false
-                        Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                        table:
-                            input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                            output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                            serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-              Select Operator
-                expressions: array(1,2) (type: array<int>)
-                outputColumnNames: _col0
-                Statistics: Num rows: 500 Data size: 24000 Basic stats: COMPLETE Column stats: COMPLETE
-                UDTF Operator
-                  Statistics: Num rows: 500 Data size: 24000 Basic stats: COMPLETE Column stats: COMPLETE
-                  function name: explode
-                  Lateral View Join Operator
-                    outputColumnNames: _col5
-                    Statistics: Num rows: 500 Data size: 196000 Basic stats: COMPLETE Column stats: COMPLETE
-                    Limit
-                      Number of rows: 2
-                      Statistics: Num rows: 2 Data size: 536 Basic stats: COMPLETE Column stats: COMPLETE
-                      Select Operator
-                        expressions: assert_true((_col5 > 0)) (type: void)
-                        outputColumnNames: _col0
-                        Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                        File Output Operator
-                          compressed: false
-                          Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                          table:
-                              input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                              output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-0
-    Fetch Operator
-      limit: 2
-      Processor Tree:
-        ListSink
+                      ListSink
 
 PREHOOK: query: SELECT ASSERT_TRUE(x > 0) FROM src LATERAL VIEW EXPLODE(ARRAY(1, 2)) a AS x LIMIT 2
 PREHOOK: type: QUERY
@@ -93,70 +64,45 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-0 depends on stages: Stage-1
+  Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: src
-            Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
-            Lateral View Forward
-              Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
-              Select Operator
-                Statistics: Num rows: 500 Data size: 172000 Basic stats: COMPLETE Column stats: COMPLETE
+  Stage: Stage-0
+    Fetch Operator
+      limit: 2
+      Processor Tree:
+        TableScan
+          alias: src
+          Lateral View Forward
+            Select Operator
+              Lateral View Join Operator
+                outputColumnNames: _col5
+                Limit
+                  Number of rows: 2
+                  Select Operator
+                    expressions: assert_true((_col5 < 2)) (type: void)
+                    outputColumnNames: _col0
+                    ListSink
+            Select Operator
+              expressions: array(1,2) (type: array<int>)
+              outputColumnNames: _col0
+              UDTF Operator
+                function name: explode
                 Lateral View Join Operator
                   outputColumnNames: _col5
-                  Statistics: Num rows: 500 Data size: 196000 Basic stats: COMPLETE Column stats: COMPLETE
                   Limit
                     Number of rows: 2
-                    Statistics: Num rows: 2 Data size: 536 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: assert_true((_col5 < 2)) (type: void)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                      File Output Operator
-                        compressed: false
-                        Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                        table:
-                            input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                            output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                            serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-              Select Operator
-                expressions: array(1,2) (type: array<int>)
-                outputColumnNames: _col0
-                Statistics: Num rows: 500 Data size: 24000 Basic stats: COMPLETE Column stats: COMPLETE
-                UDTF Operator
-                  Statistics: Num rows: 500 Data size: 24000 Basic stats: COMPLETE Column stats: COMPLETE
-                  function name: explode
-                  Lateral View Join Operator
-                    outputColumnNames: _col5
-                    Statistics: Num rows: 500 Data size: 196000 Basic stats: COMPLETE Column stats: COMPLETE
-                    Limit
-                      Number of rows: 2
-                      Statistics: Num rows: 2 Data size: 536 Basic stats: COMPLETE Column stats: COMPLETE
-                      Select Operator
-                        expressions: assert_true((_col5 < 2)) (type: void)
-                        outputColumnNames: _col0
-                        Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                        File Output Operator
-                          compressed: false
-                          Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                          table:
-                              input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                              output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-0
-    Fetch Operator
-      limit: 2
-      Processor Tree:
-        ListSink
+                      ListSink
 
 PREHOOK: query: SELECT ASSERT_TRUE(x < 2) FROM src LATERAL VIEW EXPLODE(ARRAY(1, 2)) a AS x LIMIT 2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+POSTHOOK: query: SELECT ASSERT_TRUE(x < 2) FROM src LATERAL VIEW EXPLODE(ARRAY(1, 2)) a AS x LIMIT 2
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
diff --git a/ql/src/test/results/clientnegative/udf_assert_true2.q.out b/ql/src/test/results/clientnegative/udf_assert_true2.q.out
index 037e6a5..d634668 100644
--- a/ql/src/test/results/clientnegative/udf_assert_true2.q.out
+++ b/ql/src/test/results/clientnegative/udf_assert_true2.q.out
@@ -7,70 +7,45 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-0 depends on stages: Stage-1
+  Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Map Reduce
-      Map Operator Tree:
-          TableScan
-            alias: src
-            Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
-            Lateral View Forward
-              Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE
-              Select Operator
-                Statistics: Num rows: 500 Data size: 172000 Basic stats: COMPLETE Column stats: COMPLETE
+  Stage: Stage-0
+    Fetch Operator
+      limit: 2
+      Processor Tree:
+        TableScan
+          alias: src
+          Lateral View Forward
+            Select Operator
+              Lateral View Join Operator
+                outputColumnNames: _col5
+                Limit
+                  Number of rows: 2
+                  Select Operator
+                    expressions: (1 + assert_true((_col5 < 2))) (type: int)
+                    outputColumnNames: _col0
+                    ListSink
+            Select Operator
+              expressions: array(1,2) (type: array<int>)
+              outputColumnNames: _col0
+              UDTF Operator
+                function name: explode
                 Lateral View Join Operator
                   outputColumnNames: _col5
-                  Statistics: Num rows: 500 Data size: 196000 Basic stats: COMPLETE Column stats: COMPLETE
                   Limit
                     Number of rows: 2
-                    Statistics: Num rows: 2 Data size: 536 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: (1 + assert_true((_col5 < 2))) (type: int)
                       outputColumnNames: _col0
-                      Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                      File Output Operator
-                        compressed: false
-                        Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                        table:
-                            input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                            output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                            serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-              Select Operator
-                expressions: array(1,2) (type: array<int>)
-                outputColumnNames: _col0
-                Statistics: Num rows: 500 Data size: 24000 Basic stats: COMPLETE Column stats: COMPLETE
-                UDTF Operator
-                  Statistics: Num rows: 500 Data size: 24000 Basic stats: COMPLETE Column stats: COMPLETE
-                  function name: explode
-                  Lateral View Join Operator
-                    outputColumnNames: _col5
-                    Statistics: Num rows: 500 Data size: 196000 Basic stats: COMPLETE Column stats: COMPLETE
-                    Limit
-                      Number of rows: 2
-                      Statistics: Num rows: 2 Data size: 536 Basic stats: COMPLETE Column stats: COMPLETE
-                      Select Operator
-                        expressions: (1 + assert_true((_col5 < 2))) (type: int)
-                        outputColumnNames: _col0
-                        Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                        File Output Operator
-                          compressed: false
-                          Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                          table:
-                              input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                              output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
-  Stage: Stage-0
-    Fetch Operator
-      limit: 2
-      Processor Tree:
-        ListSink
+                      ListSink
 
 PREHOOK: query: SELECT 1 + ASSERT_TRUE(x < 2) FROM src LATERAL VIEW EXPLODE(ARRAY(1, 2)) a AS x LIMIT 2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+POSTHOOK: query: SELECT 1 + ASSERT_TRUE(x < 2) FROM src LATERAL VIEW EXPLODE(ARRAY(1, 2)) a AS x LIMIT 2
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
diff --git a/ql/src/test/results/clientnegative/udf_reflect_neg.q.out b/ql/src/test/results/clientnegative/udf_reflect_neg.q.out
index 7ae91b5..a98811d 100644
--- a/ql/src/test/results/clientnegative/udf_reflect_neg.q.out
+++ b/ql/src/test/results/clientnegative/udf_reflect_neg.q.out
@@ -9,4 +9,15 @@ FROM src LIMIT 1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+POSTHOOK: query: SELECT reflect("java.lang.StringClassThatDoesNotExist", "valueOf", 1),
+       reflect("java.lang.String", "methodThatDoesNotExist"),
+       reflect("java.lang.Math", "max", "overloadthatdoesnotexist", 3),
+       reflect("java.lang.Math", "min", 2, 3),
+       reflect("java.lang.Math", "round", 2.5),
+       reflect("java.lang.Math", "exp", 1.0),
+       reflect("java.lang.Math", "floor", 1.9)
+FROM src LIMIT 1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: UDFReflect evaluate error while loading class java.lang.StringClassThatDoesNotExist
diff --git a/ql/src/test/results/clientnegative/udf_test_error.q.out b/ql/src/test/results/clientnegative/udf_test_error.q.out
index 5ad5ff6..65b39f1 100644
--- a/ql/src/test/results/clientnegative/udf_test_error.q.out
+++ b/ql/src/test/results/clientnegative/udf_test_error.q.out
@@ -8,4 +8,8 @@ PREHOOK: query: SELECT test_error(key < 125 OR key > 130) FROM src
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+POSTHOOK: query: SELECT test_error(key < 125 OR key > 130) FROM src
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+#### A masked pattern was here ####
+Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public int org.apache.hadoop.hive.ql.udf.UDFTestErrorOnFalse.evaluate(java.lang.Boolean):UDFTestErrorOnFalse got b=false
diff --git a/ql/src/test/results/clientnegative/udf_test_error_reduce.q.out b/ql/src/test/results/clientnegative/udf_test_error_reduce.q.out
index fec6b5d..97187c6 100644
--- a/ql/src/test/results/clientnegative/udf_test_error_reduce.q.out
+++ b/ql/src/test/results/clientnegative/udf_test_error_reduce.q.out
@@ -13,4 +13,8 @@ FROM (
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
+Status: Failed
+Vertex re-running, vertexName=Map 1, vertexId=vertex_#ID#
+Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE, Vertex vertex_#ID# [Map 1] failed as task task_#ID# failed after vertex succeeded.]
+DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
+FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex re-running, vertexName=Map 1, vertexId=vertex_#ID#Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE, Vertex vertex_#ID# [Map 1] failed as task task_#ID# failed after vertex succeeded.]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
diff --git a/ql/src/test/results/clientnegative/union22.q.out b/ql/src/test/results/clientnegative/union22.q.out
deleted file mode 100644
index 1db78af..0000000
--- a/ql/src/test/results/clientnegative/union22.q.out
+++ /dev/null
@@ -1,47 +0,0 @@
-PREHOOK: query: create table dst_union22(k1 string, k2 string, k3 string, k4 string) partitioned by (ds string)
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@dst_union22
-POSTHOOK: query: create table dst_union22(k1 string, k2 string, k3 string, k4 string) partitioned by (ds string)
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@dst_union22
-PREHOOK: query: create table dst_union22_delta(k0 string, k1 string, k2 string, k3 string, k4 string, k5 string) partitioned by (ds string)
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@dst_union22_delta
-POSTHOOK: query: create table dst_union22_delta(k0 string, k1 string, k2 string, k3 string, k4 string, k5 string) partitioned by (ds string)
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@dst_union22_delta
-PREHOOK: query: insert overwrite table dst_union22 partition (ds='1')
-select key, value, key , value from src
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@dst_union22@ds=1
-POSTHOOK: query: insert overwrite table dst_union22 partition (ds='1')
-select key, value, key , value from src
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@dst_union22@ds=1
-POSTHOOK: Lineage: dst_union22 PARTITION(ds=1).k1 SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dst_union22 PARTITION(ds=1).k2 SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-POSTHOOK: Lineage: dst_union22 PARTITION(ds=1).k3 SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dst_union22 PARTITION(ds=1).k4 SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-PREHOOK: query: insert overwrite table dst_union22_delta partition (ds='1')
-select key, key, value, key, value, value from src
-PREHOOK: type: QUERY
-PREHOOK: Input: default@src
-PREHOOK: Output: default@dst_union22_delta@ds=1
-POSTHOOK: query: insert overwrite table dst_union22_delta partition (ds='1')
-select key, key, value, key, value, value from src
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@src
-POSTHOOK: Output: default@dst_union22_delta@ds=1
-POSTHOOK: Lineage: dst_union22_delta PARTITION(ds=1).k0 SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dst_union22_delta PARTITION(ds=1).k1 SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dst_union22_delta PARTITION(ds=1).k2 SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-POSTHOOK: Lineage: dst_union22_delta PARTITION(ds=1).k3 SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
-POSTHOOK: Lineage: dst_union22_delta PARTITION(ds=1).k4 SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-POSTHOOK: Lineage: dst_union22_delta PARTITION(ds=1).k5 SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
-FAILED: SemanticException [Error 10227]: Not all clauses are supported with mapjoin hint. Please remove mapjoin hint.
diff --git a/ql/src/test/results/clientpositive/llap/retry_failure.q.out b/ql/src/test/results/clientpositive/llap/retry_failure.q.out
index 59d854a..6edcb06 100644
--- a/ql/src/test/results/clientpositive/llap/retry_failure.q.out
+++ b/ql/src/test/results/clientpositive/llap/retry_failure.q.out
@@ -23,14 +23,46 @@ PREHOOK: Input: default@tx_n1
 Status: Failed
 Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
 #### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
 ], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
 #### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
 ]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE]
 DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
 FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: A [...]
 #### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
 ], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
 #### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
 ]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
 PREHOOK: query: select assert_true(2 > a) from tx_n1 group by a
 PREHOOK: type: QUERY
@@ -48,14 +80,38 @@ PREHOOK: Input: default@tx_n1
 Status: Failed
 Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
 #### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
 ], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
 #### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
 ]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]
 DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
 FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
 #### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
 ], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
 #### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
 ]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Map 1] killed/failed due to:OWN_TASK_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
 PREHOOK: query: select assert_true(2 > a), assert_true("default" = "default") from tx_n1
 PREHOOK: type: QUERY
diff --git a/ql/src/test/results/clientpositive/llap/retry_failure_oom.q.out b/ql/src/test/results/clientpositive/llap/retry_failure_oom.q.out
index 348384a..bab87ce 100644
--- a/ql/src/test/results/clientpositive/llap/retry_failure_oom.q.out
+++ b/ql/src/test/results/clientpositive/llap/retry_failure_oom.q.out
@@ -23,14 +23,22 @@ PREHOOK: Input: default@tx
 Status: Failed
 Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
 #### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
+#### A masked pattern was here ####
 ], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
 #### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
+#### A masked pattern was here ####
 ]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE]
 DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
 FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
 #### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
+#### A masked pattern was here ####
 ], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
 #### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
+#### A masked pattern was here ####
 ]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
 PREHOOK: query: select assert_true_oom(2 > a) from tx group by a
 PREHOOK: type: QUERY
diff --git a/ql/src/test/results/clientpositive/llap/retry_failure_reorder.q.out b/ql/src/test/results/clientpositive/llap/retry_failure_reorder.q.out
index 82c1948..c9db27d 100644
--- a/ql/src/test/results/clientpositive/llap/retry_failure_reorder.q.out
+++ b/ql/src/test/results/clientpositive/llap/retry_failure_reorder.q.out
@@ -326,14 +326,22 @@ PREHOOK: Input: default@tw
 Status: Failed
 Vertex failed, vertexName=Reducer 4, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
 #### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
+#### A masked pattern was here ####
 ], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
 #### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
+#### A masked pattern was here ####
 ]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 4] killed/failed due to:OWN_TASK_FAILURE]
 DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
 FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Reducer 4, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
 #### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
+#### A masked pattern was here ####
 ], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
 #### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
+#### A masked pattern was here ####
 ]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 4] killed/failed due to:OWN_TASK_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
 PREHOOK: query: select assert_true_oom(200000 > sum(u*v*w)) from tu
         join tv on (tu.id_uv=tv.id_uv)
diff --git a/ql/src/test/results/clientpositive/llap/retry_failure_stat_changes.q.out b/ql/src/test/results/clientpositive/llap/retry_failure_stat_changes.q.out
index 8ec6624..20a23f4 100644
--- a/ql/src/test/results/clientpositive/llap/retry_failure_stat_changes.q.out
+++ b/ql/src/test/results/clientpositive/llap/retry_failure_stat_changes.q.out
@@ -282,14 +282,22 @@ PREHOOK: Input: default@tx_n2
 Status: Failed
 Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
 #### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
+#### A masked pattern was here ####
 ], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
 #### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
+#### A masked pattern was here ####
 ]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE]
 DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
 FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
 #### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
+#### A masked pattern was here ####
 ], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
 #### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError: assert_true_oom: assertation failed; Simulated OOM
+#### A masked pattern was here ####
 ]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
 PREHOOK: query: select assert_true_oom(2000 > sum(u*p)) from tx_n2 join px on (tx_n2.a=px.a) where u<10 and p>2
 PREHOOK: type: QUERY
diff --git a/ql/src/test/results/clientpositive/llap/vector_retry_failure.q.out b/ql/src/test/results/clientpositive/llap/vector_retry_failure.q.out
index 25faddd..6e9d9ae 100644
--- a/ql/src/test/results/clientpositive/llap/vector_retry_failure.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_retry_failure.q.out
@@ -145,14 +145,30 @@ PREHOOK: Input: default@tx_n0
 Status: Failed
 Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: ASSERT_TRUE(): assertion failed.
 #### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
 ], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: ASSERT_TRUE(): assertion failed.
 #### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
 ]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE]
 DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
 FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Reducer 2, vertexId=vertex_#ID#, diagnostics=[Task failed, taskId=task_#ID#, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: ASSERT_TRUE(): assertion failed.
 #### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
 ], TaskAttempt 1 failed, info=[Error: Error while running task ( failure ) : attempt_#ID#:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: ASSERT_TRUE(): assertion failed.
 #### A masked pattern was here ####
+Caused by: java.lang.RuntimeException: Hive Runtime Error while closing operators: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
+Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: ASSERT_TRUE(): assertion failed.
+#### A masked pattern was here ####
 ]], Vertex did not succeed due to OWN_TASK_FAILURE, failedTasks:1 killedTasks:0, Vertex vertex_#ID# [Reducer 2] killed/failed due to:OWN_TASK_FAILURE]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
 PREHOOK: query: select assert_true(2 > a) from tx_n0 group by a
 PREHOOK: type: QUERY