http://git-wip-us.apache.org/repos/asf/hive/blob/2b9f2f5e/ql/src/test/results/clientpositive/tez/vectorized_timestamp_ints_casts.q.out
----------------------------------------------------------------------
diff --git
a/ql/src/test/results/clientpositive/tez/vectorized_timestamp_ints_casts.q.out
b/ql/src/test/results/clientpositive/tez/vectorized_timestamp_ints_casts.q.out
new file mode 100644
index 0000000..1e74446
--- /dev/null
+++
b/ql/src/test/results/clientpositive/tez/vectorized_timestamp_ints_casts.q.out
@@ -0,0 +1,234 @@
+PREHOOK: query: explain
+select
+-- to timestamp
+ cast (ctinyint as timestamp)
+ ,cast (csmallint as timestamp)
+ ,cast (cint as timestamp)
+ ,cast (cbigint as timestamp)
+ ,cast (cfloat as timestamp)
+ ,cast (cdouble as timestamp)
+ ,cast (cboolean1 as timestamp)
+ ,cast (cbigint * 0 as timestamp)
+ ,cast (ctimestamp1 as timestamp)
+ ,cast (cstring1 as timestamp)
+ ,cast (substr(cstring1, 1, 1) as timestamp)
+from alltypesorc
+-- limit output to a reasonably small number of rows
+where cbigint % 250 = 0
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+select
+-- to timestamp
+ cast (ctinyint as timestamp)
+ ,cast (csmallint as timestamp)
+ ,cast (cint as timestamp)
+ ,cast (cbigint as timestamp)
+ ,cast (cfloat as timestamp)
+ ,cast (cdouble as timestamp)
+ ,cast (cboolean1 as timestamp)
+ ,cast (cbigint * 0 as timestamp)
+ ,cast (ctimestamp1 as timestamp)
+ ,cast (cstring1 as timestamp)
+ ,cast (substr(cstring1, 1, 1) as timestamp)
+from alltypesorc
+-- limit output to a reasonably small number of rows
+where cbigint % 250 = 0
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+ Stage-0 is a root stage
+
+STAGE PLANS:
+ Stage: Stage-0
+ Fetch Operator
+ limit: -1
+ Processor Tree:
+ TableScan
+ alias: alltypesorc
+ Filter Operator
+ predicate: ((cbigint % 250) = 0) (type: boolean)
+ Select Operator
+ expressions: CAST( ctinyint AS TIMESTAMP) (type: timestamp),
CAST( csmallint AS TIMESTAMP) (type: timestamp), CAST( cint AS TIMESTAMP)
(type: timestamp), CAST( cbigint AS TIMESTAMP) (type: timestamp), CAST( cfloat
AS TIMESTAMP) (type: timestamp), CAST( cdouble AS TIMESTAMP) (type: timestamp),
CAST( cboolean1 AS TIMESTAMP) (type: timestamp), CAST( (cbigint * 0) AS
TIMESTAMP) (type: timestamp), ctimestamp1 (type: timestamp), CAST( cstring1 AS
TIMESTAMP) (type: timestamp), CAST( substr(cstring1, 1, 1) AS TIMESTAMP) (type:
timestamp)
+ outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5,
_col6, _col7, _col8, _col9, _col10
+ ListSink
+
+PREHOOK: query: select
+-- to timestamp
+ cast (ctinyint as timestamp)
+ ,cast (csmallint as timestamp)
+ ,cast (cint as timestamp)
+ ,cast (cbigint as timestamp)
+ ,cast (cfloat as timestamp)
+ ,cast (cdouble as timestamp)
+ ,cast (cboolean1 as timestamp)
+ ,cast (cbigint * 0 as timestamp)
+ ,cast (ctimestamp1 as timestamp)
+ ,cast (cstring1 as timestamp)
+ ,cast (substr(cstring1, 1, 1) as timestamp)
+from alltypesorc
+-- limit output to a reasonably small number of rows
+where cbigint % 250 = 0
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select
+-- to timestamp
+ cast (ctinyint as timestamp)
+ ,cast (csmallint as timestamp)
+ ,cast (cint as timestamp)
+ ,cast (cbigint as timestamp)
+ ,cast (cfloat as timestamp)
+ ,cast (cdouble as timestamp)
+ ,cast (cboolean1 as timestamp)
+ ,cast (cbigint * 0 as timestamp)
+ ,cast (ctimestamp1 as timestamp)
+ ,cast (cstring1 as timestamp)
+ ,cast (substr(cstring1, 1, 1) as timestamp)
+from alltypesorc
+-- limit output to a reasonably small number of rows
+where cbigint % 250 = 0
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+1969-12-31 15:59:59.964 1969-12-31 15:59:59.8 NULL 1969-12-08
10:43:03.25 1969-12-31 15:59:24 1969-12-31 15:56:40 NULL 1969-12-31
16:00:00 1969-12-31 15:59:45.748 NULL NULL
+1969-12-31 15:59:59.964 1969-12-31 15:59:59.8 NULL 1970-01-19
04:24:39 1969-12-31 15:59:24 1969-12-31 15:56:40 NULL 1969-12-31
16:00:00 1969-12-31 15:59:53.817 NULL NULL
+1969-12-31 15:59:59.97 1969-12-31 15:59:59.8 NULL 1970-01-17 05:10:52.25
1969-12-31 15:59:30 1969-12-31 15:56:40 NULL 1969-12-31 16:00:00
1969-12-31 16:00:12.935 NULL NULL
+1969-12-31 15:59:59.949 NULL 1970-01-09 14:53:20.971 1970-01-12
20:45:23.25 1969-12-31 15:59:09 NULL 1969-12-31 16:00:00 1969-12-31
16:00:00 1969-12-31 16:00:08.451 NULL NULL
+1969-12-31 15:59:59.949 NULL 1970-01-09 07:39:13.882 1969-12-09
07:45:32.75 1969-12-31 15:59:09 NULL 1969-12-31 16:00:00.001 1969-12-31
16:00:00 1969-12-31 16:00:08.451 NULL NULL
+1969-12-31 16:00:00.02 1969-12-31 16:00:15.601 NULL 1969-12-27 11:19:26.75
1969-12-31 16:00:20 1969-12-31 20:20:01 NULL 1969-12-31 16:00:00
1969-12-31 15:59:45.129 NULL NULL
+1969-12-31 15:59:59.962 1969-12-31 16:00:15.601 NULL 1969-12-10
03:41:51 1969-12-31 15:59:22 1969-12-31 20:20:01 NULL 1969-12-31
16:00:00 1969-12-31 15:59:58.614 NULL NULL
+1969-12-31 15:59:59.995 1969-12-31 16:00:15.601 NULL 1970-01-07
18:06:56 1969-12-31 15:59:55 1969-12-31 20:20:01 NULL 1969-12-31
16:00:00 1969-12-31 16:00:04.679 NULL NULL
+1969-12-31 16:00:00.048 1969-12-31 16:00:15.601 NULL 1969-12-22
11:03:59 1969-12-31 16:00:48 1969-12-31 20:20:01 NULL 1969-12-31
16:00:00 1969-12-31 15:59:50.235 NULL NULL
+1969-12-31 16:00:00.008 NULL 1969-12-24 00:12:58.862 1969-12-20
21:16:47.25 1969-12-31 16:00:08 NULL 1969-12-31 16:00:00 1969-12-31
16:00:00 1969-12-31 16:00:15.892 NULL NULL
+1969-12-31 16:00:00.008 NULL 1969-12-30 11:24:23.566 1969-12-16
11:20:17.25 1969-12-31 16:00:08 NULL 1969-12-31 16:00:00 1969-12-31
16:00:00 1969-12-31 16:00:15.892 NULL NULL
+1969-12-31 16:00:00.008 NULL 1970-01-09 23:39:39.664 1970-01-10
17:09:21.5 1969-12-31 16:00:08 NULL 1969-12-31 16:00:00 1969-12-31
16:00:00 1969-12-31 16:00:15.892 NULL NULL
+1969-12-31 16:00:00.008 NULL 1969-12-23 21:59:27.689 1970-01-19
01:16:31.25 1969-12-31 16:00:08 NULL 1969-12-31 16:00:00 1969-12-31
16:00:00 1969-12-31 16:00:15.892 NULL NULL
+1969-12-31 16:00:00.008 NULL 1970-01-10 23:29:48.972 1969-12-10
02:41:39 1969-12-31 16:00:08 NULL 1969-12-31 16:00:00.001 1969-12-31
16:00:00 1969-12-31 16:00:15.892 NULL NULL
+1969-12-31 16:00:00.008 NULL 1970-01-11 10:34:27.246 1970-01-14
14:49:59.25 1969-12-31 16:00:08 NULL 1969-12-31 16:00:00.001 1969-12-31
16:00:00 1969-12-31 16:00:15.892 NULL NULL
+1969-12-31 15:59:59.941 1969-12-31 15:59:52.804 NULL 1969-12-13
02:11:50 1969-12-31 15:59:01 1969-12-31 14:00:04 NULL 1969-12-31
16:00:00 1969-12-31 16:00:13.15 NULL NULL
+1969-12-31 15:59:59.979 1969-12-31 15:59:52.804 NULL 1970-01-18
12:27:09 1969-12-31 15:59:39 1969-12-31 14:00:04 NULL 1969-12-31
16:00:00 1969-12-31 15:59:55.9 NULL NULL
+1969-12-31 15:59:59.94 1969-12-31 15:59:52.804 NULL 1970-01-18 05:11:54.75
1969-12-31 15:59:00 1969-12-31 14:00:04 NULL 1969-12-31 16:00:00
1969-12-31 15:59:52.408 NULL NULL
+1969-12-31 15:59:59.986 1969-12-31 15:59:52.804 NULL 1969-12-13
16:50:00.5 1969-12-31 15:59:46 1969-12-31 14:00:04 NULL 1969-12-31
16:00:00 1969-12-31 16:00:11.065 NULL NULL
+1969-12-31 16:00:00.059 1969-12-31 15:59:52.804 NULL 1969-12-18
11:57:25.5 1969-12-31 16:00:59 1969-12-31 14:00:04 NULL 1969-12-31
16:00:00 1969-12-31 16:00:10.956 NULL NULL
+1969-12-31 15:59:59.992 1969-12-31 15:59:52.804 NULL 1969-12-10
06:06:48.5 1969-12-31 15:59:52 1969-12-31 14:00:04 NULL 1969-12-31
16:00:00 1969-12-31 16:00:03.136 NULL NULL
+1969-12-31 16:00:00.005 1969-12-31 15:59:52.804 NULL 1969-12-19
21:53:12.5 1969-12-31 16:00:05 1969-12-31 14:00:04 NULL 1969-12-31
16:00:00 1969-12-31 16:00:10.973 NULL NULL
+1969-12-31 15:59:59.976 1969-12-31 15:59:52.804 NULL 1970-01-10
06:18:31 1969-12-31 15:59:36 1969-12-31 14:00:04 NULL 1969-12-31
16:00:00 1969-12-31 15:59:53.145 NULL NULL
+1969-12-31 15:59:59.95 1969-12-31 15:59:52.804 NULL 1969-12-19 17:33:32.75
1969-12-31 15:59:10 1969-12-31 14:00:04 NULL 1969-12-31 16:00:00
1969-12-31 15:59:54.733 NULL NULL
+1969-12-31 16:00:00.011 NULL 1969-12-30 22:03:04.018 1970-01-21
12:50:53.75 1969-12-31 16:00:11 NULL 1969-12-31 16:00:00.001 1969-12-31
16:00:00 1969-12-31 16:00:02.351 NULL NULL
+1969-12-31 16:00:00.011 NULL 1969-12-27 18:49:09.583 1970-01-14
22:35:27 1969-12-31 16:00:11 NULL 1969-12-31 16:00:00.001 1969-12-31
16:00:00 1969-12-31 16:00:02.351 NULL NULL
+PREHOOK: query: explain
+select
+-- to timestamp
+ cast (ctinyint as timestamp)
+ ,cast (csmallint as timestamp)
+ ,cast (cint as timestamp)
+ ,cast (cbigint as timestamp)
+ ,cast (cfloat as timestamp)
+ ,cast (cdouble as timestamp)
+ ,cast (cboolean1 as timestamp)
+ ,cast (cbigint * 0 as timestamp)
+ ,cast (ctimestamp1 as timestamp)
+ ,cast (cstring1 as timestamp)
+ ,cast (substr(cstring1, 1, 1) as timestamp)
+from alltypesorc
+-- limit output to a reasonably small number of rows
+where cbigint % 250 = 0
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+select
+-- to timestamp
+ cast (ctinyint as timestamp)
+ ,cast (csmallint as timestamp)
+ ,cast (cint as timestamp)
+ ,cast (cbigint as timestamp)
+ ,cast (cfloat as timestamp)
+ ,cast (cdouble as timestamp)
+ ,cast (cboolean1 as timestamp)
+ ,cast (cbigint * 0 as timestamp)
+ ,cast (ctimestamp1 as timestamp)
+ ,cast (cstring1 as timestamp)
+ ,cast (substr(cstring1, 1, 1) as timestamp)
+from alltypesorc
+-- limit output to a reasonably small number of rows
+where cbigint % 250 = 0
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+ Stage-0 is a root stage
+
+STAGE PLANS:
+ Stage: Stage-0
+ Fetch Operator
+ limit: -1
+ Processor Tree:
+ TableScan
+ alias: alltypesorc
+ Filter Operator
+ predicate: ((cbigint % 250) = 0) (type: boolean)
+ Select Operator
+ expressions: CAST( ctinyint AS TIMESTAMP) (type: timestamp),
CAST( csmallint AS TIMESTAMP) (type: timestamp), CAST( cint AS TIMESTAMP)
(type: timestamp), CAST( cbigint AS TIMESTAMP) (type: timestamp), CAST( cfloat
AS TIMESTAMP) (type: timestamp), CAST( cdouble AS TIMESTAMP) (type: timestamp),
CAST( cboolean1 AS TIMESTAMP) (type: timestamp), CAST( (cbigint * 0) AS
TIMESTAMP) (type: timestamp), ctimestamp1 (type: timestamp), CAST( cstring1 AS
TIMESTAMP) (type: timestamp), CAST( substr(cstring1, 1, 1) AS TIMESTAMP) (type:
timestamp)
+ outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5,
_col6, _col7, _col8, _col9, _col10
+ ListSink
+
+PREHOOK: query: select
+-- to timestamp
+ cast (ctinyint as timestamp)
+ ,cast (csmallint as timestamp)
+ ,cast (cint as timestamp)
+ ,cast (cbigint as timestamp)
+ ,cast (cfloat as timestamp)
+ ,cast (cdouble as timestamp)
+ ,cast (cboolean1 as timestamp)
+ ,cast (cbigint * 0 as timestamp)
+ ,cast (ctimestamp1 as timestamp)
+ ,cast (cstring1 as timestamp)
+ ,cast (substr(cstring1, 1, 1) as timestamp)
+from alltypesorc
+-- limit output to a reasonably small number of rows
+where cbigint % 250 = 0
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+POSTHOOK: query: select
+-- to timestamp
+ cast (ctinyint as timestamp)
+ ,cast (csmallint as timestamp)
+ ,cast (cint as timestamp)
+ ,cast (cbigint as timestamp)
+ ,cast (cfloat as timestamp)
+ ,cast (cdouble as timestamp)
+ ,cast (cboolean1 as timestamp)
+ ,cast (cbigint * 0 as timestamp)
+ ,cast (ctimestamp1 as timestamp)
+ ,cast (cstring1 as timestamp)
+ ,cast (substr(cstring1, 1, 1) as timestamp)
+from alltypesorc
+-- limit output to a reasonably small number of rows
+where cbigint % 250 = 0
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alltypesorc
+#### A masked pattern was here ####
+1969-12-31 15:59:24 1969-12-31 15:56:40 NULL 1906-06-05 13:34:10
1969-12-31 15:59:24 1969-12-31 15:56:40 NULL 1969-12-31 16:00:00
1969-12-31 15:59:45.748 NULL NULL
+1969-12-31 15:59:24 1969-12-31 15:56:40 NULL 2020-09-11 19:50:00
1969-12-31 15:59:24 1969-12-31 15:56:40 NULL 1969-12-31 16:00:00
1969-12-31 15:59:53.817 NULL NULL
+1969-12-31 15:59:30 1969-12-31 15:56:40 NULL 2015-04-23 22:10:50
1969-12-31 15:59:30 1969-12-31 15:56:40 NULL 1969-12-31 16:00:00
1969-12-31 16:00:12.935 NULL NULL
+1969-12-31 15:59:09 NULL 1994-07-07 10:09:31 2003-05-25 21:27:30
1969-12-31 15:59:09 NULL 1969-12-31 16:00:00 1969-12-31 16:00:00
1969-12-31 16:00:08.451 NULL NULL
+1969-12-31 15:59:09 NULL 1993-09-08 22:51:22 1908-10-29 07:05:50
1969-12-31 15:59:09 NULL 1969-12-31 16:00:01 1969-12-31 16:00:00
1969-12-31 16:00:08.451 NULL NULL
+1969-12-31 16:00:20 1969-12-31 20:20:01 NULL 1958-07-07 21:05:50
1969-12-31 16:00:20 1969-12-31 20:20:01 NULL 1969-12-31 16:00:00
1969-12-31 15:59:45.129 NULL NULL
+1969-12-31 15:59:22 1969-12-31 20:20:01 NULL 1911-02-07 01:30:00
1969-12-31 15:59:22 1969-12-31 20:20:01 NULL 1969-12-31 16:00:00
1969-12-31 15:59:58.614 NULL NULL
+1969-12-31 15:59:55 1969-12-31 20:20:01 NULL 1989-05-28 20:33:20
1969-12-31 15:59:55 1969-12-31 20:20:01 NULL 1969-12-31 16:00:00
1969-12-31 16:00:04.679 NULL NULL
+1969-12-31 16:00:48 1969-12-31 20:20:01 NULL 1944-10-18 03:23:20
1969-12-31 16:00:48 1969-12-31 20:20:01 NULL 1969-12-31 16:00:00
1969-12-31 15:59:50.235 NULL NULL
+1969-12-31 16:00:08 NULL 1949-01-13 00:21:02 1940-06-26 15:47:30
1969-12-31 16:00:08 NULL 1969-12-31 16:00:00 1969-12-31 16:00:00
1969-12-31 16:00:15.892 NULL NULL
+1969-12-31 16:00:08 NULL 1966-09-27 07:32:46 1928-05-26 10:07:30
1969-12-31 16:00:08 NULL 1969-12-31 16:00:00 1969-12-31 16:00:00
1969-12-31 16:00:15.892 NULL NULL
+1969-12-31 16:00:08 NULL 1995-07-07 22:01:04 1997-07-05 20:58:20
1969-12-31 16:00:08 NULL 1969-12-31 16:00:00 1969-12-31 16:00:00
1969-12-31 16:00:15.892 NULL NULL
+1969-12-31 16:00:08 NULL 1948-10-12 08:01:29 2020-05-04 04:20:50
1969-12-31 16:00:08 NULL 1969-12-31 16:00:00 1969-12-31 16:00:00
1969-12-31 16:00:15.892 NULL NULL
+1969-12-31 16:00:08 NULL 1998-03-27 00:56:12 1910-12-27 06:10:00
1969-12-31 16:00:08 NULL 1969-12-31 16:00:01 1969-12-31 16:00:00
1969-12-31 16:00:15.892 NULL NULL
+1969-12-31 16:00:08 NULL 1999-07-01 15:14:06 2008-03-13 02:07:30
1969-12-31 16:00:08 NULL 1969-12-31 16:00:01 1969-12-31 16:00:00
1969-12-31 16:00:15.892 NULL NULL
+1969-12-31 15:59:01 1969-12-31 14:00:04 NULL 1919-02-22 13:13:20
1969-12-31 15:59:01 1969-12-31 14:00:04 NULL 1969-12-31 16:00:00
1969-12-31 16:00:13.15 NULL NULL
+1969-12-31 15:59:39 1969-12-31 14:00:04 NULL 2018-11-16 20:30:00
1969-12-31 15:59:39 1969-12-31 14:00:04 NULL 1969-12-31 16:00:00
1969-12-31 15:59:55.9 NULL NULL
+1969-12-31 15:59:00 1969-12-31 14:00:04 NULL 2018-01-18 14:32:30
1969-12-31 15:59:00 1969-12-31 14:00:04 NULL 1969-12-31 16:00:00
1969-12-31 15:59:52.408 NULL NULL
+1969-12-31 15:59:46 1969-12-31 14:00:04 NULL 1920-10-24 09:28:20
1969-12-31 15:59:46 1969-12-31 14:00:04 NULL 1969-12-31 16:00:00
1969-12-31 16:00:11.065 NULL NULL
+1969-12-31 16:00:59 1969-12-31 14:00:04 NULL 1933-12-12 05:05:00
1969-12-31 16:00:59 1969-12-31 14:00:04 NULL 1969-12-31 16:00:00
1969-12-31 16:00:10.956 NULL NULL
+1969-12-31 15:59:52 1969-12-31 14:00:04 NULL 1911-05-18 17:28:20
1969-12-31 15:59:52 1969-12-31 14:00:04 NULL 1969-12-31 16:00:00
1969-12-31 16:00:03.136 NULL NULL
+1969-12-31 16:00:05 1969-12-31 14:00:04 NULL 1937-10-25 22:48:20
1969-12-31 16:00:05 1969-12-31 14:00:04 NULL 1969-12-31 16:00:00
1969-12-31 16:00:10.973 NULL NULL
+1969-12-31 15:59:36 1969-12-31 14:00:04 NULL 1996-04-09 21:36:40
1969-12-31 15:59:36 1969-12-31 14:00:04 NULL 1969-12-31 16:00:00
1969-12-31 15:59:53.145 NULL NULL
+1969-12-31 15:59:10 1969-12-31 14:00:04 NULL 1937-04-28 15:05:50
1969-12-31 15:59:10 1969-12-31 14:00:04 NULL 1969-12-31 16:00:00
1969-12-31 15:59:54.733 NULL NULL
+1969-12-31 16:00:11 NULL 1967-12-14 19:06:58 2027-02-19 08:15:50
1969-12-31 16:00:11 NULL 1969-12-31 16:00:01 1969-12-31 16:00:00
1969-12-31 16:00:02.351 NULL NULL
+1969-12-31 16:00:11 NULL 1959-05-16 04:19:43 2009-01-30 06:50:00
1969-12-31 16:00:11 NULL 1969-12-31 16:00:01 1969-12-31 16:00:00
1969-12-31 16:00:02.351 NULL NULL