diff --git itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java index 2d290db..2552382 100644 --- itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java +++ itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java @@ -251,7 +251,6 @@ excludeQuery("schema_evol_orc_acidvec_part.q"); // Disabled in HIVE-19509 excludeQuery("schema_evol_orc_vec_part_llap_io.q"); // Disabled in HIVE-19509 excludeQuery("load_dyn_part3.q"); // Disabled in HIVE-20662. Enable in HIVE-20663. - excludeQuery("cbo_limit.q"); //Disabled in HIVE-20860. Enable in HIVE-20972 excludeQuery("rfc5424_parser_file_pruning.q"); // Disabled in HIVE-21427 excludeQuery("cbo_rp_limit.q"); // Disabled in HIVE-21657 diff --git ql/src/test/queries/clientpositive/cbo_limit.q ql/src/test/queries/clientpositive/cbo_limit.q index d0b1bc9..063ca16 100644 --- ql/src/test/queries/clientpositive/cbo_limit.q +++ ql/src/test/queries/clientpositive/cbo_limit.q @@ -9,7 +9,7 @@ set hive.auto.convert.join=false; -- 7. Test Select + TS + Join + Fil + GB + GB Having + Limit -select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x limit 1; +select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x, key limit 1; select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x order by x,y limit 1; select key from(select key from (select key from cbo_t1 limit 5)cbo_t2 limit 5)cbo_t3 limit 5; select key, c_int from(select key, c_int from (select key, c_int from cbo_t1 order by c_int limit 5)cbo_t1 order by c_int limit 5)cbo_t2 order by c_int limit 5; diff --git ql/src/test/results/clientpositive/llap/cbo_limit.q.out ql/src/test/results/clientpositive/llap/cbo_limit.q.out index ee62b31..74e2b16 100644 --- ql/src/test/results/clientpositive/llap/cbo_limit.q.out +++ ql/src/test/results/clientpositive/llap/cbo_limit.q.out @@ -1,9 +1,9 @@ -PREHOOK: query: select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x limit 1 +PREHOOK: query: select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x, key limit 1 PREHOOK: type: QUERY PREHOOK: Input: default@cbo_t1 PREHOOK: Input: default@cbo_t1@dt=2014 #### A masked pattern was here #### -POSTHOOK: query: select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x limit 1 +POSTHOOK: query: select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x, key limit 1 POSTHOOK: type: QUERY POSTHOOK: Input: default@cbo_t1 POSTHOOK: Input: default@cbo_t1@dt=2014 @@ -19,7 +19,7 @@ POSTHOOK: Input: default@cbo_t1 POSTHOOK: Input: default@cbo_t1@dt=2014 #### A masked pattern was here #### -5.0 2 1 +5.0 2 3 PREHOOK: query: select key from(select key from (select key from cbo_t1 limit 5)cbo_t2 limit 5)cbo_t3 limit 5 PREHOOK: type: QUERY PREHOOK: Input: default@cbo_t1 diff --git ql/src/test/results/clientpositive/spark/cbo_limit.q.out ql/src/test/results/clientpositive/spark/cbo_limit.q.out index a7455d9..74e2b16 100644 --- ql/src/test/results/clientpositive/spark/cbo_limit.q.out +++ ql/src/test/results/clientpositive/spark/cbo_limit.q.out @@ -1,14 +1,14 @@ -PREHOOK: query: select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x limit 1 +PREHOOK: query: select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x, key limit 1 PREHOOK: type: QUERY PREHOOK: Input: default@cbo_t1 PREHOOK: Input: default@cbo_t1@dt=2014 #### A masked pattern was here #### -POSTHOOK: query: select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x limit 1 +POSTHOOK: query: select key, (c_int+1)+2 as x, sum(c_int) from cbo_t1 group by c_float, cbo_t1.c_int, key order by x, key limit 1 POSTHOOK: type: QUERY POSTHOOK: Input: default@cbo_t1 POSTHOOK: Input: default@cbo_t1@dt=2014 #### A masked pattern was here #### -1 4 2 + 1 4 2 PREHOOK: query: select x, y, count(*) from (select key, (c_int+c_float+1+2) as x, sum(c_int) as y from cbo_t1 group by c_float, cbo_t1.c_int, key) R group by y, x order by x,y limit 1 PREHOOK: type: QUERY PREHOOK: Input: default@cbo_t1