Repository: hive
Updated Branches:
  refs/heads/master 65abf418a -> 91a0cb8fa


HIVE-19145 : Stabilize statsoptimizer.q test

Signed-off-by: Ashutosh Chauhan <hashut...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/91a0cb8f
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/91a0cb8f
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/91a0cb8f

Branch: refs/heads/master
Commit: 91a0cb8fa34d8fcc2f1086209e6f6986e54eb95e
Parents: 65abf41
Author: Ashutosh Chauhan <hashut...@apache.org>
Authored: Mon Apr 9 21:28:08 2018 -0700
Committer: Ashutosh Chauhan <hashut...@apache.org>
Committed: Mon Apr 9 21:28:08 2018 -0700

----------------------------------------------------------------------
 .../test/queries/clientpositive/statsoptimizer.q  |  8 ++++----
 .../results/clientpositive/statsoptimizer.q.out   | 18 +++++++++---------
 2 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/91a0cb8f/ql/src/test/queries/clientpositive/statsoptimizer.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/statsoptimizer.q 
b/ql/src/test/queries/clientpositive/statsoptimizer.q
index 428b741..a3dbe4e 100644
--- a/ql/src/test/queries/clientpositive/statsoptimizer.q
+++ b/ql/src/test/queries/clientpositive/statsoptimizer.q
@@ -2,13 +2,13 @@ set hive.cbo.enable=false;
 set hive.compute.query.using.stats=true;
 
 EXPLAIN
-SELECT to_date(current_date()) as GROUP_BY_FIELD, count (*)  as src_cnt
+SELECT round(year(to_date(current_date())),-3) as GROUP_BY_FIELD, count (*)  
as src_cnt
 from src
 WHERE 1=1
-group by to_date(current_date());
+group by round(year(to_date(current_date())),-3);
 
-SELECT to_date(current_date()) as GROUP_BY_FIELD, count (*)  as src_cnt
+SELECT round(year(to_date(current_date())),-3) as GROUP_BY_FIELD, count (*)  
as src_cnt
 from src
 WHERE 1=1
-group by to_date(current_date());
+group by round(year(to_date(current_date())),-3);
 

http://git-wip-us.apache.org/repos/asf/hive/blob/91a0cb8f/ql/src/test/results/clientpositive/statsoptimizer.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/statsoptimizer.q.out 
b/ql/src/test/results/clientpositive/statsoptimizer.q.out
index 1f97de3..35330d9 100644
--- a/ql/src/test/results/clientpositive/statsoptimizer.q.out
+++ b/ql/src/test/results/clientpositive/statsoptimizer.q.out
@@ -1,14 +1,14 @@
 PREHOOK: query: EXPLAIN
-SELECT to_date(current_date()) as GROUP_BY_FIELD, count (*)  as src_cnt
+SELECT round(year(to_date(current_date())),-3) as GROUP_BY_FIELD, count (*)  
as src_cnt
 from src
 WHERE 1=1
-group by to_date(current_date())
+group by round(year(to_date(current_date())),-3)
 PREHOOK: type: QUERY
 POSTHOOK: query: EXPLAIN
-SELECT to_date(current_date()) as GROUP_BY_FIELD, count (*)  as src_cnt
+SELECT round(year(to_date(current_date())),-3) as GROUP_BY_FIELD, count (*)  
as src_cnt
 from src
 WHERE 1=1
-group by to_date(current_date())
+group by round(year(to_date(current_date())),-3)
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
   Stage-0 is a root stage
@@ -20,18 +20,18 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: SELECT to_date(current_date()) as GROUP_BY_FIELD, count (*)  
as src_cnt
+PREHOOK: query: SELECT round(year(to_date(current_date())),-3) as 
GROUP_BY_FIELD, count (*)  as src_cnt
 from src
 WHERE 1=1
-group by to_date(current_date())
+group by round(year(to_date(current_date())),-3)
 PREHOOK: type: QUERY
 PREHOOK: Input: default@src
 #### A masked pattern was here ####
-POSTHOOK: query: SELECT to_date(current_date()) as GROUP_BY_FIELD, count (*)  
as src_cnt
+POSTHOOK: query: SELECT round(year(to_date(current_date())),-3) as 
GROUP_BY_FIELD, count (*)  as src_cnt
 from src
 WHERE 1=1
-group by to_date(current_date())
+group by round(year(to_date(current_date())),-3)
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@src
 #### A masked pattern was here ####
-2018-04-04     500
+2000   500

Reply via email to