hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jd...@apache.org
Subject [1/2] hive git commit: HIVE-13248: Change date_add/date_sub/to_date functions to return Date type rather than String (Jason Dere, reviewed by Matt McCline)
Date Wed, 08 Jun 2016 17:24:51 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-2.1 39aaec264 -> 4981c1b07


http://git-wip-us.apache.org/repos/asf/hive/blob/4981c1b0/ql/src/test/results/clientpositive/union_offcbo.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/union_offcbo.q.out b/ql/src/test/results/clientpositive/union_offcbo.q.out
index c71d53f..2c4c0de 100644
--- a/ql/src/test/results/clientpositive/union_offcbo.q.out
+++ b/ql/src/test/results/clientpositive/union_offcbo.q.out
@@ -60,7 +60,7 @@ POSTHOOK: Output: database:default
 POSTHOOK: Output: default@ttest2
 PREHOOK: query: explain SELECT
   A2.id1, A2.sts,A2.at1,
-    CASE WHEN FLAG = 'A_INS' THEN date_add('2015-11-20', 1) ELSE '2015-11-20' END dt1
+    CASE WHEN FLAG = 'A_INS' THEN cast(date_add('2015-11-20', 1) as string) ELSE '2015-11-20'
END dt1
         ,A2.dt2
         ,A2.khash
         ,A2.rhash
@@ -148,7 +148,7 @@ PREHOOK: query: explain SELECT
 PREHOOK: type: QUERY
 POSTHOOK: query: explain SELECT
   A2.id1, A2.sts,A2.at1,
-    CASE WHEN FLAG = 'A_INS' THEN date_add('2015-11-20', 1) ELSE '2015-11-20' END dt1
+    CASE WHEN FLAG = 'A_INS' THEN cast(date_add('2015-11-20', 1) as string) ELSE '2015-11-20'
END dt1
         ,A2.dt2
         ,A2.khash
         ,A2.rhash
@@ -403,7 +403,7 @@ STAGE PLANS:
 
 PREHOOK: query: explain SELECT
   A2.id1, A2.sts,A2.at1,
-    CASE WHEN FLAG = 'A_INS' THEN date_add('2015-11-20', 1) ELSE '2015-11-20' END dt1
+    CASE WHEN FLAG = 'A_INS' THEN cast(date_add('2015-11-20', 1) as string) ELSE '2015-11-20'
END dt1
         ,A2.dt2
         ,A2.khash
         ,A2.rhash
@@ -491,7 +491,7 @@ PREHOOK: query: explain SELECT
 PREHOOK: type: QUERY
 POSTHOOK: query: explain SELECT
   A2.id1, A2.sts,A2.at1,
-    CASE WHEN FLAG = 'A_INS' THEN date_add('2015-11-20', 1) ELSE '2015-11-20' END dt1
+    CASE WHEN FLAG = 'A_INS' THEN cast(date_add('2015-11-20', 1) as string) ELSE '2015-11-20'
END dt1
         ,A2.dt2
         ,A2.khash
         ,A2.rhash
@@ -740,7 +740,7 @@ STAGE PLANS:
 
 PREHOOK: query: explain SELECT
   A2.id1, A2.sts,A2.at1,
-    CASE WHEN FLAG = 'A_INS' THEN date_add('2015-11-20', 1) ELSE '2015-11-20' END dt1
+    CASE WHEN FLAG = 'A_INS' THEN cast(date_add('2015-11-20', 1) as string) ELSE '2015-11-20'
END dt1
         ,A2.dt2
         ,A2.khash
         ,A2.rhash
@@ -828,7 +828,7 @@ PREHOOK: query: explain SELECT
 PREHOOK: type: QUERY
 POSTHOOK: query: explain SELECT
   A2.id1, A2.sts,A2.at1,
-    CASE WHEN FLAG = 'A_INS' THEN date_add('2015-11-20', 1) ELSE '2015-11-20' END dt1
+    CASE WHEN FLAG = 'A_INS' THEN cast(date_add('2015-11-20', 1) as string) ELSE '2015-11-20'
END dt1
         ,A2.dt2
         ,A2.khash
         ,A2.rhash
@@ -1083,7 +1083,7 @@ STAGE PLANS:
 
 PREHOOK: query: explain SELECT
   A2.id1, A2.sts,A2.at1,
-    CASE WHEN FLAG = 'A_INS' THEN date_add('2015-11-20', 1) ELSE '2015-11-20' END dt1
+    CASE WHEN FLAG = 'A_INS' THEN cast(date_add('2015-11-20', 1) as string) ELSE '2015-11-20'
END dt1
         ,A2.dt2
         ,A2.khash
         ,A2.rhash
@@ -1171,7 +1171,7 @@ PREHOOK: query: explain SELECT
 PREHOOK: type: QUERY
 POSTHOOK: query: explain SELECT
   A2.id1, A2.sts,A2.at1,
-    CASE WHEN FLAG = 'A_INS' THEN date_add('2015-11-20', 1) ELSE '2015-11-20' END dt1
+    CASE WHEN FLAG = 'A_INS' THEN cast(date_add('2015-11-20', 1) as string) ELSE '2015-11-20'
END dt1
         ,A2.dt2
         ,A2.khash
         ,A2.rhash
@@ -1426,7 +1426,7 @@ STAGE PLANS:
 
 PREHOOK: query: explain SELECT
   A2.id1, A2.sts,A2.at1,
-    CASE WHEN FLAG = 'A_INS' THEN date_add('2015-11-20', 1) ELSE '2015-11-20' END dt1
+    CASE WHEN FLAG = 'A_INS' THEN cast(date_add('2015-11-20', 1) as string) ELSE '2015-11-20'
END dt1
         ,A2.dt2
         ,A2.khash
         ,A2.rhash
@@ -1514,7 +1514,7 @@ PREHOOK: query: explain SELECT
 PREHOOK: type: QUERY
 POSTHOOK: query: explain SELECT
   A2.id1, A2.sts,A2.at1,
-    CASE WHEN FLAG = 'A_INS' THEN date_add('2015-11-20', 1) ELSE '2015-11-20' END dt1
+    CASE WHEN FLAG = 'A_INS' THEN cast(date_add('2015-11-20', 1) as string) ELSE '2015-11-20'
END dt1
         ,A2.dt2
         ,A2.khash
         ,A2.rhash

http://git-wip-us.apache.org/repos/asf/hive/blob/4981c1b0/ql/src/test/results/clientpositive/vectorized_date_funcs.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vectorized_date_funcs.q.out b/ql/src/test/results/clientpositive/vectorized_date_funcs.q.out
index b8023e2..299d3bc 100644
--- a/ql/src/test/results/clientpositive/vectorized_date_funcs.q.out
+++ b/ql/src/test/results/clientpositive/vectorized_date_funcs.q.out
@@ -243,7 +243,7 @@ STAGE PLANS:
             alias: date_udf_flight_orc
             Statistics: Num rows: 137 Data size: 13152 Basic stats: COMPLETE Column stats:
NONE
             Select Operator
-              expressions: to_unix_timestamp(fl_time) (type: bigint), year(fl_time) (type:
int), month(fl_time) (type: int), day(fl_time) (type: int), dayofmonth(fl_time) (type: int),
weekofyear(fl_time) (type: int), CAST( fl_time AS DATE) (type: date), to_date(fl_time) (type:
string), date_add(fl_time, 2) (type: string), date_sub(fl_time, 2) (type: string), datediff(fl_time,
'2000-01-01') (type: int)
+              expressions: to_unix_timestamp(fl_time) (type: bigint), year(fl_time) (type:
int), month(fl_time) (type: int), day(fl_time) (type: int), dayofmonth(fl_time) (type: int),
weekofyear(fl_time) (type: int), CAST( fl_time AS DATE) (type: date), to_date(fl_time) (type:
date), date_add(fl_time, 2) (type: date), date_sub(fl_time, 2) (type: date), datediff(fl_time,
'2000-01-01') (type: int)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7,
_col8, _col9, _col10
               Statistics: Num rows: 137 Data size: 13152 Basic stats: COMPLETE Column stats:
NONE
               File Output Operator
@@ -470,7 +470,7 @@ STAGE PLANS:
             alias: date_udf_flight_orc
             Statistics: Num rows: 137 Data size: 13152 Basic stats: COMPLETE Column stats:
NONE
             Select Operator
-              expressions: to_unix_timestamp(fl_date) (type: bigint), year(fl_date) (type:
int), month(fl_date) (type: int), day(fl_date) (type: int), dayofmonth(fl_date) (type: int),
weekofyear(fl_date) (type: int), fl_date (type: date), to_date(fl_date) (type: string), date_add(fl_date,
2) (type: string), date_sub(fl_date, 2) (type: string), datediff(fl_date, '2000-01-01') (type:
int)
+              expressions: to_unix_timestamp(fl_date) (type: bigint), year(fl_date) (type:
int), month(fl_date) (type: int), day(fl_date) (type: int), dayofmonth(fl_date) (type: int),
weekofyear(fl_date) (type: int), fl_date (type: date), to_date(fl_date) (type: date), date_add(fl_date,
2) (type: date), date_sub(fl_date, 2) (type: date), datediff(fl_date, '2000-01-01') (type:
int)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7,
_col8, _col9, _col10
               Statistics: Num rows: 137 Data size: 13152 Basic stats: COMPLETE Column stats:
NONE
               File Output Operator
@@ -912,7 +912,7 @@ STAGE PLANS:
             alias: date_udf_flight_orc
             Statistics: Num rows: 137 Data size: 13152 Basic stats: COMPLETE Column stats:
NONE
             Select Operator
-              expressions: fl_date (type: date), to_date(date_add(fl_date, 2)) (type: string),
to_date(date_sub(fl_date, 2)) (type: string), datediff(fl_date, date_add(fl_date, 2)) (type:
int), datediff(fl_date, date_sub(fl_date, 2)) (type: int), datediff(date_add(fl_date, 2),
date_sub(fl_date, 2)) (type: int)
+              expressions: fl_date (type: date), to_date(date_add(fl_date, 2)) (type: date),
to_date(date_sub(fl_date, 2)) (type: date), datediff(fl_date, date_add(fl_date, 2)) (type:
int), datediff(fl_date, date_sub(fl_date, 2)) (type: int), datediff(date_add(fl_date, 2),
date_sub(fl_date, 2)) (type: int)
               outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
               Statistics: Num rows: 137 Data size: 13152 Basic stats: COMPLETE Column stats:
NONE
               Limit


Mime
View raw message