You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by mm...@apache.org on 2016/12/12 09:51:43 UTC

[2/4] hive git commit: HIVE-15338: Wrong result from non-vectorized DATEDIFF with scalar parameter of type DATE/TIMESTAMP (Matt McCline, reviewed by Jason Dere)

http://git-wip-us.apache.org/repos/asf/hive/blob/6ef0b507/ql/src/test/results/clientpositive/spark/date_udf.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/spark/date_udf.q.out b/ql/src/test/results/clientpositive/spark/date_udf.q.out
index 9b37da6..2037367 100644
--- a/ql/src/test/results/clientpositive/spark/date_udf.q.out
+++ b/ql/src/test/results/clientpositive/spark/date_udf.q.out
@@ -114,7 +114,7 @@ POSTHOOK: query: select datediff(d, d), datediff(d, '2002-03-21'), datediff('200
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@date_udf
 #### A masked pattern was here ####
-0	3333	-3333	-3332	3332
+0	3333	-3333	-3333	3333
 PREHOOK: query: -- Test UDFs with string input
 select unix_timestamp(d), year(d), month(d), day(d), dayofmonth(d), 
     weekofyear(d), to_date(d)
@@ -139,21 +139,43 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@date_udf_string
 #### A masked pattern was here ####
 2011-05-11	2011-04-26
-PREHOOK: query: select datediff(d, d), datediff(d, '2002-03-21'), datediff('2002-03-21', d),
+PREHOOK: query: select
+    datediff(d, d),
+    datediff(d, '2002-03-21'),
+    datediff(d, date '2002-03-21'),
+    datediff('2002-03-21', d),
+    datediff(date '2002-03-21', d),
     datediff('2002-03-21 00:00:00', d),
-    datediff(d, '2002-03-21 00:00:00')
+    datediff(timestamp '2002-03-21 00:00:00', d),
+    datediff(d, '2002-03-21 00:00:00'),
+    datediff(d, timestamp '2002-03-21 00:00:00'),
+    datediff('2002-03-21 08:01:59', d),
+    datediff(timestamp '2002-03-21 08:01:59', d),
+    datediff(d, '2002-03-21 08:01:59'),
+    datediff(d, timestamp '2002-03-21 08:01:59')
   from date_udf_string
 PREHOOK: type: QUERY
 PREHOOK: Input: default@date_udf_string
 #### A masked pattern was here ####
-POSTHOOK: query: select datediff(d, d), datediff(d, '2002-03-21'), datediff('2002-03-21', d),
+POSTHOOK: query: select
+    datediff(d, d),
+    datediff(d, '2002-03-21'),
+    datediff(d, date '2002-03-21'),
+    datediff('2002-03-21', d),
+    datediff(date '2002-03-21', d),
     datediff('2002-03-21 00:00:00', d),
-    datediff(d, '2002-03-21 00:00:00')
+    datediff(timestamp '2002-03-21 00:00:00', d),
+    datediff(d, '2002-03-21 00:00:00'),
+    datediff(d, timestamp '2002-03-21 00:00:00'),
+    datediff('2002-03-21 08:01:59', d),
+    datediff(timestamp '2002-03-21 08:01:59', d),
+    datediff(d, '2002-03-21 08:01:59'),
+    datediff(d, timestamp '2002-03-21 08:01:59')
   from date_udf_string
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@date_udf_string
 #### A masked pattern was here ####
-0	3333	-3333	-3333	3333
+0	3333	3333	-3333	-3333	-3333	-3333	3333	3333	-3333	-3333	3333	3333
 PREHOOK: query: select 
     to_utc_timestamp(date '1970-01-01', 'America/Los_Angeles'),
     from_utc_timestamp(date '1970-01-01', 'America/Los_Angeles'),