hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jd...@apache.org
Subject [2/2] hive git commit: HIVE-11079: Fix qfile tests that fail on Windows due to CR/character escape differences (Jason Dere, reviewed by Gunther Hagleitner)
Date Wed, 24 Jun 2015 20:17:47 GMT
HIVE-11079: Fix qfile tests that fail on Windows due to CR/character escape differences (Jason Dere, reviewed by Gunther Hagleitner)


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

Branch: refs/heads/master
Commit: c8a41f1ca7b5cc10f24947fb86c2f3839e8de1c2
Parents: eb278d3
Author: Jason Dere <jdere@hortonworks.com>
Authored: Wed Jun 24 13:16:35 2015 -0700
Committer: Jason Dere <jdere@hortonworks.com>
Committed: Wed Jun 24 13:16:35 2015 -0700

----------------------------------------------------------------------
 .../queries/clientpositive/avro_timestamp.q     |    2 +
 .../queries/clientpositive/avro_timestamp_win.q |   28 +
 .../clientpositive/partition_timestamp.q        |    2 +
 .../clientpositive/partition_timestamp2.q       |    2 +
 .../clientpositive/partition_timestamp2_win.q   |   58 +
 .../clientpositive/partition_timestamp_win.q    |   59 +
 .../vector_partitioned_date_time.q              |    4 +-
 .../vector_partitioned_date_time_win.q          |  129 ++
 .../clientpositive/avro_timestamp.q.java1.7.out |    8 +-
 .../clientpositive/avro_timestamp.q.java1.8.out |    8 +-
 .../avro_timestamp_win.q.java1.7.out            |  134 ++
 .../avro_timestamp_win.q.java1.8.out            |  134 ++
 .../clientpositive/partition_timestamp.q.out    |    8 +-
 .../clientpositive/partition_timestamp2.q.out   |    8 +-
 .../partition_timestamp2_win.q.out              |  399 ++++
 .../partition_timestamp_win.q.out               |  316 +++
 .../tez/vector_partitioned_date_time.q.out      |   10 +-
 .../vector_partitioned_date_time.q.out          |   10 +-
 .../vector_partitioned_date_time_win.q.out      | 2036 ++++++++++++++++++
 19 files changed, 3342 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/queries/clientpositive/avro_timestamp.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/avro_timestamp.q b/ql/src/test/queries/clientpositive/avro_timestamp.q
index 0d78ee9..d17fdc6 100644
--- a/ql/src/test/queries/clientpositive/avro_timestamp.q
+++ b/ql/src/test/queries/clientpositive/avro_timestamp.q
@@ -1,3 +1,5 @@
+-- Exclude test on Windows due to space character being escaped in Hive paths on Windows.
+-- EXCLUDE_OS_WINDOWS
 -- JAVA_VERSION_SPECIFIC_OUTPUT
 
 DROP TABLE avro_timestamp_staging;

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/queries/clientpositive/avro_timestamp_win.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/avro_timestamp_win.q b/ql/src/test/queries/clientpositive/avro_timestamp_win.q
new file mode 100644
index 0000000..9abfd44
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/avro_timestamp_win.q
@@ -0,0 +1,28 @@
+-- Windows-specific test due to space character being escaped in Hive paths on Windows.
+-- INCLUDE_OS_WINDOWS
+-- JAVA_VERSION_SPECIFIC_OUTPUT
+
+DROP TABLE avro_timestamp_staging;
+DROP TABLE avro_timestamp;
+DROP TABLE avro_timestamp_casts;
+
+CREATE TABLE avro_timestamp_staging (d timestamp, m1 map<string, timestamp>, l1 array<timestamp>)
+   ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
+   COLLECTION ITEMS TERMINATED BY ',' MAP KEYS TERMINATED BY ':'
+   STORED AS TEXTFILE;
+
+LOAD DATA LOCAL INPATH '../../data/files/avro_timestamp.txt' OVERWRITE INTO TABLE avro_timestamp_staging;
+
+CREATE TABLE avro_timestamp (d timestamp, m1 map<string, timestamp>, l1 array<timestamp>)
+  PARTITIONED BY (p1 int, p2 timestamp)
+  ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
+  COLLECTION ITEMS TERMINATED BY ',' MAP KEYS TERMINATED BY ':'
+  STORED AS AVRO;
+
+INSERT OVERWRITE TABLE avro_timestamp PARTITION(p1=2, p2='2014-09-26 07:08:09.123') SELECT * FROM avro_timestamp_staging;
+
+SELECT * FROM avro_timestamp;
+SELECT d, COUNT(d) FROM avro_timestamp GROUP BY d;
+SELECT * FROM avro_timestamp WHERE d!='1947-02-11 07:08:09.123';
+SELECT * FROM avro_timestamp WHERE d<'2014-12-21 07:08:09.123';
+SELECT * FROM avro_timestamp WHERE d>'8000-12-01 07:08:09.123';

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/queries/clientpositive/partition_timestamp.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/partition_timestamp.q b/ql/src/test/queries/clientpositive/partition_timestamp.q
index aa1a0c0..6f290fa 100644
--- a/ql/src/test/queries/clientpositive/partition_timestamp.q
+++ b/ql/src/test/queries/clientpositive/partition_timestamp.q
@@ -1,3 +1,5 @@
+-- Exclude test on Windows due to space character being escaped in Hive paths on Windows.
+-- EXCLUDE_OS_WINDOWS
 drop table partition_timestamp_1;
 
 create table partition_timestamp_1 (key string, value string) partitioned by (dt timestamp, region string);

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/queries/clientpositive/partition_timestamp2.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/partition_timestamp2.q b/ql/src/test/queries/clientpositive/partition_timestamp2.q
index 1f5ec26..a2c1c07 100644
--- a/ql/src/test/queries/clientpositive/partition_timestamp2.q
+++ b/ql/src/test/queries/clientpositive/partition_timestamp2.q
@@ -1,3 +1,5 @@
+-- Exclude test on Windows due to space character being escaped in Hive paths on Windows.
+-- EXCLUDE_OS_WINDOWS
 drop table partition_timestamp2_1;
 
 create table partition_timestamp2_1 (key string, value string) partitioned by (dt timestamp, region int);

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/queries/clientpositive/partition_timestamp2_win.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/partition_timestamp2_win.q b/ql/src/test/queries/clientpositive/partition_timestamp2_win.q
new file mode 100644
index 0000000..67b8f1e
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/partition_timestamp2_win.q
@@ -0,0 +1,58 @@
+-- Windows-specific due to space character being escaped in Hive paths on Windows.
+-- INCLUDE_OS_WINDOWS
+drop table partition_timestamp2_1;
+
+create table partition_timestamp2_1 (key string, value string) partitioned by (dt timestamp, region int);
+
+-- test timestamp literal syntax
+from (select * from src tablesample (1 rows)) x
+insert overwrite table partition_timestamp2_1 partition(dt=timestamp '2000-01-01 00:00:00', region=1) select *
+insert overwrite table partition_timestamp2_1 partition(dt=timestamp '2000-01-01 01:00:00', region=1) select *
+insert overwrite table partition_timestamp2_1 partition(dt=timestamp '1999-01-01 00:00:00', region=2) select *
+insert overwrite table partition_timestamp2_1 partition(dt=timestamp '1999-01-01 01:00:00', region=2) select *;
+
+select distinct dt from partition_timestamp2_1;
+select * from partition_timestamp2_1;
+
+-- insert overwrite
+insert overwrite table partition_timestamp2_1 partition(dt=timestamp '2000-01-01 00:00:00', region=1)
+  select 'changed_key', 'changed_value' from src tablesample (2 rows);
+select * from partition_timestamp2_1;
+
+-- truncate
+truncate table partition_timestamp2_1 partition(dt=timestamp '2000-01-01 00:00:00', region=1);
+select distinct dt from partition_timestamp2_1;
+select * from partition_timestamp2_1;
+
+-- alter table add partition
+alter table partition_timestamp2_1 add partition (dt=timestamp '1980-01-02 00:00:00', region=3);
+select distinct dt from partition_timestamp2_1;
+select * from partition_timestamp2_1;
+
+-- alter table drop
+alter table partition_timestamp2_1 drop partition (dt=timestamp '1999-01-01 01:00:00', region=2);
+select distinct dt from partition_timestamp2_1;
+select * from partition_timestamp2_1;
+
+-- alter table set serde
+alter table partition_timestamp2_1 partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+  set serde 'org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe';
+
+-- alter table set fileformat
+alter table partition_timestamp2_1 partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+  set fileformat rcfile;
+describe extended partition_timestamp2_1  partition(dt=timestamp '1980-01-02 00:00:00', region=3);
+
+insert overwrite table partition_timestamp2_1 partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+  select * from src tablesample (2 rows);
+select * from partition_timestamp2_1 order by key,value,dt,region;
+
+-- alter table set location
+alter table partition_timestamp2_1 partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+  set location "file:///tmp/partition_timestamp2_1";
+describe extended partition_timestamp2_1 partition(dt=timestamp '1980-01-02 00:00:00', region=3);
+
+-- alter table touch
+alter table partition_timestamp2_1 touch partition(dt=timestamp '1980-01-02 00:00:00', region=3);
+
+drop table partition_timestamp2_1;

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/queries/clientpositive/partition_timestamp_win.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/partition_timestamp_win.q b/ql/src/test/queries/clientpositive/partition_timestamp_win.q
new file mode 100644
index 0000000..bcc87df
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/partition_timestamp_win.q
@@ -0,0 +1,59 @@
+-- Windows-specific test due to space character being escaped in Hive paths on Windows.
+-- INCLUDE_OS_WINDOWS
+drop table partition_timestamp_1;
+
+create table partition_timestamp_1 (key string, value string) partitioned by (dt timestamp, region string);
+
+insert overwrite table partition_timestamp_1 partition(dt='2000-01-01 01:00:00', region= '1')
+  select * from src tablesample (10 rows);
+insert overwrite table partition_timestamp_1 partition(dt='2000-01-01 02:00:00', region= '2')
+  select * from src tablesample (5 rows);
+insert overwrite table partition_timestamp_1 partition(dt='2001-01-01 01:00:00', region= '2020-20-20')
+  select * from src tablesample (5 rows);
+insert overwrite table partition_timestamp_1 partition(dt='2001-01-01 02:00:00', region= '1')
+  select * from src tablesample (20 rows);
+insert overwrite table partition_timestamp_1 partition(dt='2001-01-01 03:00:00', region= '10')
+  select * from src tablesample (11 rows);
+
+select distinct dt from partition_timestamp_1;
+select * from partition_timestamp_1 where dt = '2000-01-01 01:00:00' and region = '2' order by key,value;
+
+-- 10
+select count(*) from partition_timestamp_1 where dt = timestamp '2000-01-01 01:00:00';
+-- 10.  Also try with string value in predicate
+select count(*) from partition_timestamp_1 where dt = '2000-01-01 01:00:00';
+-- 5
+select count(*) from partition_timestamp_1 where dt = timestamp '2000-01-01 02:00:00' and region = '2';
+-- 11
+select count(*) from partition_timestamp_1 where dt = timestamp '2001-01-01 03:00:00' and region = '10';
+-- 30
+select count(*) from partition_timestamp_1 where region = '1';
+-- 0
+select count(*) from partition_timestamp_1 where dt = timestamp '2000-01-01 01:00:00' and region = '3';
+-- 0
+select count(*) from partition_timestamp_1 where dt = timestamp '1999-01-01 01:00:00';
+
+-- Try other comparison operations
+
+-- 20
+select count(*) from partition_timestamp_1 where dt > timestamp '2000-01-01 01:00:00' and region = '1';
+-- 10
+select count(*) from partition_timestamp_1 where dt < timestamp '2000-01-02 01:00:00' and region = '1';
+-- 20
+select count(*) from partition_timestamp_1 where dt >= timestamp '2000-01-02 01:00:00' and region = '1';
+-- 10
+select count(*) from partition_timestamp_1 where dt <= timestamp '2000-01-01 01:00:00' and region = '1';
+-- 20
+select count(*) from partition_timestamp_1 where dt <> timestamp '2000-01-01 01:00:00' and region = '1';
+-- 10
+select count(*) from partition_timestamp_1 where dt between timestamp '1999-12-30 12:00:00' and timestamp '2000-01-03 12:00:00' and region = '1';
+
+
+-- Try a string key with timestamp-like strings
+
+-- 5
+select count(*) from partition_timestamp_1 where region = '2020-20-20';
+-- 5
+select count(*) from partition_timestamp_1 where region > '2010-01-01';
+
+drop table partition_timestamp_1;

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/queries/clientpositive/vector_partitioned_date_time.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/vector_partitioned_date_time.q b/ql/src/test/queries/clientpositive/vector_partitioned_date_time.q
index c6480d2..c04a523 100644
--- a/ql/src/test/queries/clientpositive/vector_partitioned_date_time.q
+++ b/ql/src/test/queries/clientpositive/vector_partitioned_date_time.q
@@ -1,6 +1,8 @@
 set hive.explain.user=false;
 set hive.fetch.task.conversion=minimal;
 
+-- Exclude test on Windows due to space character being escaped in Hive paths on Windows.
+-- EXCLUDE_OS_WINDOWS
 
 -- Check if vectorization code is handling partitioning on DATE and the other data types.
 
@@ -125,4 +127,4 @@ select * from flights_tiny_orc_partitioned_timestamp sort by fl_num, fl_time lim
 explain
 select fl_time, count(*) from flights_tiny_orc_partitioned_timestamp group by fl_time;
 
-select fl_time, count(*) from flights_tiny_orc_partitioned_timestamp group by fl_time;
\ No newline at end of file
+select fl_time, count(*) from flights_tiny_orc_partitioned_timestamp group by fl_time;

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/queries/clientpositive/vector_partitioned_date_time_win.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/vector_partitioned_date_time_win.q b/ql/src/test/queries/clientpositive/vector_partitioned_date_time_win.q
new file mode 100644
index 0000000..c157df1
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/vector_partitioned_date_time_win.q
@@ -0,0 +1,129 @@
+set hive.fetch.task.conversion=minimal;
+
+-- Windows-specific test due to space character being escaped in Hive paths on Windows.
+-- INCLUDE_OS_WINDOWS
+
+-- Check if vectorization code is handling partitioning on DATE and the other data types.
+
+
+CREATE TABLE flights_tiny (
+  origin_city_name STRING,
+  dest_city_name STRING,
+  fl_date DATE,
+  arr_delay FLOAT,
+  fl_num INT
+);
+
+LOAD DATA LOCAL INPATH '../../data/files/flights_tiny.txt.1' OVERWRITE INTO TABLE flights_tiny;
+
+CREATE TABLE flights_tiny_orc STORED AS ORC AS
+SELECT origin_city_name, dest_city_name, fl_date, to_utc_timestamp(fl_date, 'America/Los_Angeles') as fl_time, arr_delay, fl_num
+FROM flights_tiny;
+
+SELECT * FROM flights_tiny_orc;
+
+SET hive.vectorized.execution.enabled=false;
+
+select * from flights_tiny_orc sort by fl_num, fl_date limit 25;
+
+select fl_date, count(*) from flights_tiny_orc group by fl_date;
+
+SET hive.vectorized.execution.enabled=true;
+
+explain
+select * from flights_tiny_orc sort by fl_num, fl_date limit 25;
+
+select * from flights_tiny_orc sort by fl_num, fl_date limit 25;
+
+explain
+select fl_date, count(*) from flights_tiny_orc group by fl_date;
+
+select fl_date, count(*) from flights_tiny_orc group by fl_date;
+
+
+SET hive.vectorized.execution.enabled=false;
+
+CREATE TABLE flights_tiny_orc_partitioned_date (
+  origin_city_name STRING,
+  dest_city_name STRING,
+  fl_time TIMESTAMP,
+  arr_delay FLOAT,
+  fl_num INT
+)
+PARTITIONED BY (fl_date DATE)
+STORED AS ORC;
+
+set hive.exec.dynamic.partition.mode=nonstrict;
+
+INSERT INTO TABLE flights_tiny_orc_partitioned_date
+PARTITION (fl_date)
+SELECT  origin_city_name, dest_city_name, fl_time, arr_delay, fl_num, fl_date
+FROM flights_tiny_orc;
+
+
+select * from flights_tiny_orc_partitioned_date;
+
+select * from flights_tiny_orc_partitioned_date sort by fl_num, fl_date limit 25;
+
+select fl_date, count(*) from flights_tiny_orc_partitioned_date group by fl_date;
+
+SET hive.vectorized.execution.enabled=true;
+
+explain
+select * from flights_tiny_orc_partitioned_date;
+
+select * from flights_tiny_orc_partitioned_date;
+
+explain
+select * from flights_tiny_orc_partitioned_date sort by fl_num, fl_date limit 25;
+
+select * from flights_tiny_orc_partitioned_date sort by fl_num, fl_date limit 25;
+
+explain
+select fl_date, count(*) from flights_tiny_orc_partitioned_date group by fl_date;
+
+select fl_date, count(*) from flights_tiny_orc_partitioned_date group by fl_date;
+
+
+SET hive.vectorized.execution.enabled=false;
+
+CREATE TABLE flights_tiny_orc_partitioned_timestamp (
+  origin_city_name STRING,
+  dest_city_name STRING,
+  fl_date DATE,
+  arr_delay FLOAT,
+  fl_num INT
+)
+PARTITIONED BY (fl_time TIMESTAMP)
+STORED AS ORC;
+
+set hive.exec.dynamic.partition.mode=nonstrict;
+
+INSERT INTO TABLE flights_tiny_orc_partitioned_timestamp
+PARTITION (fl_time)
+SELECT  origin_city_name, dest_city_name, fl_date, arr_delay, fl_num, fl_time
+FROM flights_tiny_orc;
+
+
+select * from flights_tiny_orc_partitioned_timestamp;
+
+select * from flights_tiny_orc_partitioned_timestamp sort by fl_num, fl_time limit 25;
+
+select fl_time, count(*) from flights_tiny_orc_partitioned_timestamp group by fl_time;
+
+SET hive.vectorized.execution.enabled=true;
+
+explain
+select * from flights_tiny_orc_partitioned_timestamp;
+
+select * from flights_tiny_orc_partitioned_timestamp;
+
+explain
+select * from flights_tiny_orc_partitioned_timestamp sort by fl_num, fl_time limit 25;
+
+select * from flights_tiny_orc_partitioned_timestamp sort by fl_num, fl_time limit 25;
+
+explain
+select fl_time, count(*) from flights_tiny_orc_partitioned_timestamp group by fl_time;
+
+select fl_time, count(*) from flights_tiny_orc_partitioned_timestamp group by fl_time;

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/results/clientpositive/avro_timestamp.q.java1.7.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/avro_timestamp.q.java1.7.out b/ql/src/test/results/clientpositive/avro_timestamp.q.java1.7.out
index 97f54fd..d2d3b7c 100644
--- a/ql/src/test/results/clientpositive/avro_timestamp.q.java1.7.out
+++ b/ql/src/test/results/clientpositive/avro_timestamp.q.java1.7.out
@@ -1,8 +1,12 @@
-PREHOOK: query: -- JAVA_VERSION_SPECIFIC_OUTPUT
+PREHOOK: query: -- Exclude test on Windows due to space character being escaped in Hive paths on Windows.
+-- EXCLUDE_OS_WINDOWS
+-- JAVA_VERSION_SPECIFIC_OUTPUT
 
 DROP TABLE avro_timestamp_staging
 PREHOOK: type: DROPTABLE
-POSTHOOK: query: -- JAVA_VERSION_SPECIFIC_OUTPUT
+POSTHOOK: query: -- Exclude test on Windows due to space character being escaped in Hive paths on Windows.
+-- EXCLUDE_OS_WINDOWS
+-- JAVA_VERSION_SPECIFIC_OUTPUT
 
 DROP TABLE avro_timestamp_staging
 POSTHOOK: type: DROPTABLE

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/results/clientpositive/avro_timestamp.q.java1.8.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/avro_timestamp.q.java1.8.out b/ql/src/test/results/clientpositive/avro_timestamp.q.java1.8.out
index 7a27f97..4c38347 100644
--- a/ql/src/test/results/clientpositive/avro_timestamp.q.java1.8.out
+++ b/ql/src/test/results/clientpositive/avro_timestamp.q.java1.8.out
@@ -1,8 +1,12 @@
-PREHOOK: query: -- JAVA_VERSION_SPECIFIC_OUTPUT
+PREHOOK: query: -- Exclude test on Windows due to space character being escaped in Hive paths on Windows.
+-- EXCLUDE_OS_WINDOWS
+-- JAVA_VERSION_SPECIFIC_OUTPUT
 
 DROP TABLE avro_timestamp_staging
 PREHOOK: type: DROPTABLE
-POSTHOOK: query: -- JAVA_VERSION_SPECIFIC_OUTPUT
+POSTHOOK: query: -- Exclude test on Windows due to space character being escaped in Hive paths on Windows.
+-- EXCLUDE_OS_WINDOWS
+-- JAVA_VERSION_SPECIFIC_OUTPUT
 
 DROP TABLE avro_timestamp_staging
 POSTHOOK: type: DROPTABLE

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/results/clientpositive/avro_timestamp_win.q.java1.7.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/avro_timestamp_win.q.java1.7.out b/ql/src/test/results/clientpositive/avro_timestamp_win.q.java1.7.out
new file mode 100755
index 0000000..6046474
--- /dev/null
+++ b/ql/src/test/results/clientpositive/avro_timestamp_win.q.java1.7.out
@@ -0,0 +1,134 @@
+PREHOOK: query: -- Windows-specific test due to space character being escaped in Hive paths on Windows.
+-- INCLUDE_OS_WINDOWS
+-- JAVA_VERSION_SPECIFIC_OUTPUT
+
+DROP TABLE avro_timestamp_staging
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: -- Windows-specific test due to space character being escaped in Hive paths on Windows.
+-- INCLUDE_OS_WINDOWS
+-- JAVA_VERSION_SPECIFIC_OUTPUT
+
+DROP TABLE avro_timestamp_staging
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: DROP TABLE avro_timestamp
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE avro_timestamp
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: DROP TABLE avro_timestamp_casts
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE avro_timestamp_casts
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: CREATE TABLE avro_timestamp_staging (d timestamp, m1 map<string, timestamp>, l1 array<timestamp>)
+   ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
+   COLLECTION ITEMS TERMINATED BY ',' MAP KEYS TERMINATED BY ':'
+   STORED AS TEXTFILE
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@avro_timestamp_staging
+POSTHOOK: query: CREATE TABLE avro_timestamp_staging (d timestamp, m1 map<string, timestamp>, l1 array<timestamp>)
+   ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
+   COLLECTION ITEMS TERMINATED BY ',' MAP KEYS TERMINATED BY ':'
+   STORED AS TEXTFILE
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@avro_timestamp_staging
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/avro_timestamp.txt' OVERWRITE INTO TABLE avro_timestamp_staging
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@avro_timestamp_staging
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/avro_timestamp.txt' OVERWRITE INTO TABLE avro_timestamp_staging
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@avro_timestamp_staging
+PREHOOK: query: CREATE TABLE avro_timestamp (d timestamp, m1 map<string, timestamp>, l1 array<timestamp>)
+  PARTITIONED BY (p1 int, p2 timestamp)
+  ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
+  COLLECTION ITEMS TERMINATED BY ',' MAP KEYS TERMINATED BY ':'
+  STORED AS AVRO
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@avro_timestamp
+POSTHOOK: query: CREATE TABLE avro_timestamp (d timestamp, m1 map<string, timestamp>, l1 array<timestamp>)
+  PARTITIONED BY (p1 int, p2 timestamp)
+  ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
+  COLLECTION ITEMS TERMINATED BY ',' MAP KEYS TERMINATED BY ':'
+  STORED AS AVRO
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@avro_timestamp
+PREHOOK: query: INSERT OVERWRITE TABLE avro_timestamp PARTITION(p1=2, p2='2014-09-26 07:08:09.123') SELECT * FROM avro_timestamp_staging
+PREHOOK: type: QUERY
+PREHOOK: Input: default@avro_timestamp_staging
+PREHOOK: Output: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+POSTHOOK: query: INSERT OVERWRITE TABLE avro_timestamp PARTITION(p1=2, p2='2014-09-26 07:08:09.123') SELECT * FROM avro_timestamp_staging
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@avro_timestamp_staging
+POSTHOOK: Output: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+POSTHOOK: Lineage: avro_timestamp PARTITION(p1=2,p2=2014-09-26 07:08:09.123).d SIMPLE [(avro_timestamp_staging)avro_timestamp_staging.FieldSchema(name:d, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: avro_timestamp PARTITION(p1=2,p2=2014-09-26 07:08:09.123).l1 SIMPLE [(avro_timestamp_staging)avro_timestamp_staging.FieldSchema(name:l1, type:array<timestamp>, comment:null), ]
+POSTHOOK: Lineage: avro_timestamp PARTITION(p1=2,p2=2014-09-26 07:08:09.123).m1 SIMPLE [(avro_timestamp_staging)avro_timestamp_staging.FieldSchema(name:m1, type:map<string,timestamp>, comment:null), ]
+PREHOOK: query: SELECT * FROM avro_timestamp
+PREHOOK: type: QUERY
+PREHOOK: Input: default@avro_timestamp
+PREHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM avro_timestamp
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@avro_timestamp
+POSTHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+2012-02-21 07:08:09.123	{"foo":"1980-12-16 07:08:09.123","bar":"1998-05-07 07:08:09.123"}	["2011-09-04 07:08:09.123","2011-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+2014-02-11 07:08:09.123	{"baz":"1981-12-16 07:08:09.123"}	["2011-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+1947-02-11 07:08:09.123	{"baz":"1921-12-16 07:08:09.123"}	["2011-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+8200-02-11 07:08:09.123	{"baz":"6981-12-16 07:08:09.123"}	["1039-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+PREHOOK: query: SELECT d, COUNT(d) FROM avro_timestamp GROUP BY d
+PREHOOK: type: QUERY
+PREHOOK: Input: default@avro_timestamp
+PREHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT d, COUNT(d) FROM avro_timestamp GROUP BY d
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@avro_timestamp
+POSTHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+1947-02-11 07:08:09.123	1
+2012-02-21 07:08:09.123	1
+2014-02-11 07:08:09.123	1
+8200-02-11 07:08:09.123	1
+PREHOOK: query: SELECT * FROM avro_timestamp WHERE d!='1947-02-11 07:08:09.123'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@avro_timestamp
+PREHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM avro_timestamp WHERE d!='1947-02-11 07:08:09.123'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@avro_timestamp
+POSTHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+2012-02-21 07:08:09.123	{"foo":"1980-12-16 07:08:09.123","bar":"1998-05-07 07:08:09.123"}	["2011-09-04 07:08:09.123","2011-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+2014-02-11 07:08:09.123	{"baz":"1981-12-16 07:08:09.123"}	["2011-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+8200-02-11 07:08:09.123	{"baz":"6981-12-16 07:08:09.123"}	["1039-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+PREHOOK: query: SELECT * FROM avro_timestamp WHERE d<'2014-12-21 07:08:09.123'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@avro_timestamp
+PREHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM avro_timestamp WHERE d<'2014-12-21 07:08:09.123'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@avro_timestamp
+POSTHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+2012-02-21 07:08:09.123	{"foo":"1980-12-16 07:08:09.123","bar":"1998-05-07 07:08:09.123"}	["2011-09-04 07:08:09.123","2011-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+2014-02-11 07:08:09.123	{"baz":"1981-12-16 07:08:09.123"}	["2011-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+1947-02-11 07:08:09.123	{"baz":"1921-12-16 07:08:09.123"}	["2011-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+PREHOOK: query: SELECT * FROM avro_timestamp WHERE d>'8000-12-01 07:08:09.123'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@avro_timestamp
+PREHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM avro_timestamp WHERE d>'8000-12-01 07:08:09.123'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@avro_timestamp
+POSTHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+8200-02-11 07:08:09.123	{"baz":"6981-12-16 07:08:09.123"}	["1039-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/results/clientpositive/avro_timestamp_win.q.java1.8.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/avro_timestamp_win.q.java1.8.out b/ql/src/test/results/clientpositive/avro_timestamp_win.q.java1.8.out
new file mode 100755
index 0000000..087d571
--- /dev/null
+++ b/ql/src/test/results/clientpositive/avro_timestamp_win.q.java1.8.out
@@ -0,0 +1,134 @@
+PREHOOK: query: -- Windows-specific test due to space character being escaped in Hive paths on Windows.
+-- INCLUDE_OS_WINDOWS
+-- JAVA_VERSION_SPECIFIC_OUTPUT
+
+DROP TABLE avro_timestamp_staging
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: -- Windows-specific test due to space character being escaped in Hive paths on Windows.
+-- INCLUDE_OS_WINDOWS
+-- JAVA_VERSION_SPECIFIC_OUTPUT
+
+DROP TABLE avro_timestamp_staging
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: DROP TABLE avro_timestamp
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE avro_timestamp
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: DROP TABLE avro_timestamp_casts
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: DROP TABLE avro_timestamp_casts
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: CREATE TABLE avro_timestamp_staging (d timestamp, m1 map<string, timestamp>, l1 array<timestamp>)
+   ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
+   COLLECTION ITEMS TERMINATED BY ',' MAP KEYS TERMINATED BY ':'
+   STORED AS TEXTFILE
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@avro_timestamp_staging
+POSTHOOK: query: CREATE TABLE avro_timestamp_staging (d timestamp, m1 map<string, timestamp>, l1 array<timestamp>)
+   ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
+   COLLECTION ITEMS TERMINATED BY ',' MAP KEYS TERMINATED BY ':'
+   STORED AS TEXTFILE
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@avro_timestamp_staging
+PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/avro_timestamp.txt' OVERWRITE INTO TABLE avro_timestamp_staging
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@avro_timestamp_staging
+POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/avro_timestamp.txt' OVERWRITE INTO TABLE avro_timestamp_staging
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@avro_timestamp_staging
+PREHOOK: query: CREATE TABLE avro_timestamp (d timestamp, m1 map<string, timestamp>, l1 array<timestamp>)
+  PARTITIONED BY (p1 int, p2 timestamp)
+  ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
+  COLLECTION ITEMS TERMINATED BY ',' MAP KEYS TERMINATED BY ':'
+  STORED AS AVRO
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@avro_timestamp
+POSTHOOK: query: CREATE TABLE avro_timestamp (d timestamp, m1 map<string, timestamp>, l1 array<timestamp>)
+  PARTITIONED BY (p1 int, p2 timestamp)
+  ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
+  COLLECTION ITEMS TERMINATED BY ',' MAP KEYS TERMINATED BY ':'
+  STORED AS AVRO
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@avro_timestamp
+PREHOOK: query: INSERT OVERWRITE TABLE avro_timestamp PARTITION(p1=2, p2='2014-09-26 07:08:09.123') SELECT * FROM avro_timestamp_staging
+PREHOOK: type: QUERY
+PREHOOK: Input: default@avro_timestamp_staging
+PREHOOK: Output: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+POSTHOOK: query: INSERT OVERWRITE TABLE avro_timestamp PARTITION(p1=2, p2='2014-09-26 07:08:09.123') SELECT * FROM avro_timestamp_staging
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@avro_timestamp_staging
+POSTHOOK: Output: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+POSTHOOK: Lineage: avro_timestamp PARTITION(p1=2,p2=2014-09-26 07:08:09.123).d SIMPLE [(avro_timestamp_staging)avro_timestamp_staging.FieldSchema(name:d, type:timestamp, comment:null), ]
+POSTHOOK: Lineage: avro_timestamp PARTITION(p1=2,p2=2014-09-26 07:08:09.123).l1 SIMPLE [(avro_timestamp_staging)avro_timestamp_staging.FieldSchema(name:l1, type:array<timestamp>, comment:null), ]
+POSTHOOK: Lineage: avro_timestamp PARTITION(p1=2,p2=2014-09-26 07:08:09.123).m1 SIMPLE [(avro_timestamp_staging)avro_timestamp_staging.FieldSchema(name:m1, type:map<string,timestamp>, comment:null), ]
+PREHOOK: query: SELECT * FROM avro_timestamp
+PREHOOK: type: QUERY
+PREHOOK: Input: default@avro_timestamp
+PREHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM avro_timestamp
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@avro_timestamp
+POSTHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+2012-02-21 07:08:09.123	{"bar":"1998-05-07 07:08:09.123","foo":"1980-12-16 07:08:09.123"}	["2011-09-04 07:08:09.123","2011-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+2014-02-11 07:08:09.123	{"baz":"1981-12-16 07:08:09.123"}	["2011-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+1947-02-11 07:08:09.123	{"baz":"1921-12-16 07:08:09.123"}	["2011-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+8200-02-11 07:08:09.123	{"baz":"6981-12-16 07:08:09.123"}	["1039-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+PREHOOK: query: SELECT d, COUNT(d) FROM avro_timestamp GROUP BY d
+PREHOOK: type: QUERY
+PREHOOK: Input: default@avro_timestamp
+PREHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT d, COUNT(d) FROM avro_timestamp GROUP BY d
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@avro_timestamp
+POSTHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+1947-02-11 07:08:09.123	1
+2012-02-21 07:08:09.123	1
+2014-02-11 07:08:09.123	1
+8200-02-11 07:08:09.123	1
+PREHOOK: query: SELECT * FROM avro_timestamp WHERE d!='1947-02-11 07:08:09.123'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@avro_timestamp
+PREHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM avro_timestamp WHERE d!='1947-02-11 07:08:09.123'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@avro_timestamp
+POSTHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+2012-02-21 07:08:09.123	{"bar":"1998-05-07 07:08:09.123","foo":"1980-12-16 07:08:09.123"}	["2011-09-04 07:08:09.123","2011-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+2014-02-11 07:08:09.123	{"baz":"1981-12-16 07:08:09.123"}	["2011-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+8200-02-11 07:08:09.123	{"baz":"6981-12-16 07:08:09.123"}	["1039-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+PREHOOK: query: SELECT * FROM avro_timestamp WHERE d<'2014-12-21 07:08:09.123'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@avro_timestamp
+PREHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM avro_timestamp WHERE d<'2014-12-21 07:08:09.123'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@avro_timestamp
+POSTHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+2012-02-21 07:08:09.123	{"bar":"1998-05-07 07:08:09.123","foo":"1980-12-16 07:08:09.123"}	["2011-09-04 07:08:09.123","2011-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+2014-02-11 07:08:09.123	{"baz":"1981-12-16 07:08:09.123"}	["2011-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+1947-02-11 07:08:09.123	{"baz":"1921-12-16 07:08:09.123"}	["2011-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123
+PREHOOK: query: SELECT * FROM avro_timestamp WHERE d>'8000-12-01 07:08:09.123'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@avro_timestamp
+PREHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT * FROM avro_timestamp WHERE d>'8000-12-01 07:08:09.123'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@avro_timestamp
+POSTHOOK: Input: default@avro_timestamp@p1=2/p2=2014-09-26%2007%3A08%3A09.123
+#### A masked pattern was here ####
+8200-02-11 07:08:09.123	{"baz":"6981-12-16 07:08:09.123"}	["1039-09-05 07:08:09.123"]	2	2014-09-26 07:08:09.123

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/results/clientpositive/partition_timestamp.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/partition_timestamp.q.out b/ql/src/test/results/clientpositive/partition_timestamp.q.out
index 7059006..566a9fc 100644
--- a/ql/src/test/results/clientpositive/partition_timestamp.q.out
+++ b/ql/src/test/results/clientpositive/partition_timestamp.q.out
@@ -1,6 +1,10 @@
-PREHOOK: query: drop table partition_timestamp_1
+PREHOOK: query: -- Exclude test on Windows due to space character being escaped in Hive paths on Windows.
+-- EXCLUDE_OS_WINDOWS
+drop table partition_timestamp_1
 PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table partition_timestamp_1
+POSTHOOK: query: -- Exclude test on Windows due to space character being escaped in Hive paths on Windows.
+-- EXCLUDE_OS_WINDOWS
+drop table partition_timestamp_1
 POSTHOOK: type: DROPTABLE
 PREHOOK: query: create table partition_timestamp_1 (key string, value string) partitioned by (dt timestamp, region string)
 PREHOOK: type: CREATETABLE

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/results/clientpositive/partition_timestamp2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/partition_timestamp2.q.out b/ql/src/test/results/clientpositive/partition_timestamp2.q.out
index 772df1a..4222f2e 100644
--- a/ql/src/test/results/clientpositive/partition_timestamp2.q.out
+++ b/ql/src/test/results/clientpositive/partition_timestamp2.q.out
@@ -1,6 +1,10 @@
-PREHOOK: query: drop table partition_timestamp2_1
+PREHOOK: query: -- Exclude test on Windows due to space character being escaped in Hive paths on Windows.
+-- EXCLUDE_OS_WINDOWS
+drop table partition_timestamp2_1
 PREHOOK: type: DROPTABLE
-POSTHOOK: query: drop table partition_timestamp2_1
+POSTHOOK: query: -- Exclude test on Windows due to space character being escaped in Hive paths on Windows.
+-- EXCLUDE_OS_WINDOWS
+drop table partition_timestamp2_1
 POSTHOOK: type: DROPTABLE
 PREHOOK: query: create table partition_timestamp2_1 (key string, value string) partitioned by (dt timestamp, region int)
 PREHOOK: type: CREATETABLE

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/results/clientpositive/partition_timestamp2_win.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/partition_timestamp2_win.q.out b/ql/src/test/results/clientpositive/partition_timestamp2_win.q.out
new file mode 100755
index 0000000..f39db1f
--- /dev/null
+++ b/ql/src/test/results/clientpositive/partition_timestamp2_win.q.out
@@ -0,0 +1,399 @@
+PREHOOK: query: -- Windows-specific due to space character being escaped in Hive paths on Windows.
+-- INCLUDE_OS_WINDOWS
+drop table partition_timestamp2_1
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: -- Windows-specific due to space character being escaped in Hive paths on Windows.
+-- INCLUDE_OS_WINDOWS
+drop table partition_timestamp2_1
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table partition_timestamp2_1 (key string, value string) partitioned by (dt timestamp, region int)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@partition_timestamp2_1
+POSTHOOK: query: create table partition_timestamp2_1 (key string, value string) partitioned by (dt timestamp, region int)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@partition_timestamp2_1
+PREHOOK: query: -- test timestamp literal syntax
+from (select * from src tablesample (1 rows)) x
+insert overwrite table partition_timestamp2_1 partition(dt=timestamp '2000-01-01 00:00:00', region=1) select *
+insert overwrite table partition_timestamp2_1 partition(dt=timestamp '2000-01-01 01:00:00', region=1) select *
+insert overwrite table partition_timestamp2_1 partition(dt=timestamp '1999-01-01 00:00:00', region=2) select *
+insert overwrite table partition_timestamp2_1 partition(dt=timestamp '1999-01-01 01:00:00', region=2) select *
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+PREHOOK: Output: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+PREHOOK: Output: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+PREHOOK: Output: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+POSTHOOK: query: -- test timestamp literal syntax
+from (select * from src tablesample (1 rows)) x
+insert overwrite table partition_timestamp2_1 partition(dt=timestamp '2000-01-01 00:00:00', region=1) select *
+insert overwrite table partition_timestamp2_1 partition(dt=timestamp '2000-01-01 01:00:00', region=1) select *
+insert overwrite table partition_timestamp2_1 partition(dt=timestamp '1999-01-01 00:00:00', region=2) select *
+insert overwrite table partition_timestamp2_1 partition(dt=timestamp '1999-01-01 01:00:00', region=2) select *
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+POSTHOOK: Output: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+POSTHOOK: Output: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+POSTHOOK: Output: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+POSTHOOK: Lineage: partition_timestamp2_1 PARTITION(dt=1999-01-01 00:00:00.0,region=2).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: partition_timestamp2_1 PARTITION(dt=1999-01-01 00:00:00.0,region=2).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: partition_timestamp2_1 PARTITION(dt=1999-01-01 01:00:00.0,region=2).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: partition_timestamp2_1 PARTITION(dt=1999-01-01 01:00:00.0,region=2).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: partition_timestamp2_1 PARTITION(dt=2000-01-01 00:00:00.0,region=1).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: partition_timestamp2_1 PARTITION(dt=2000-01-01 00:00:00.0,region=1).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+POSTHOOK: Lineage: partition_timestamp2_1 PARTITION(dt=2000-01-01 01:00:00.0,region=1).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: partition_timestamp2_1 PARTITION(dt=2000-01-01 01:00:00.0,region=1).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+PREHOOK: query: select distinct dt from partition_timestamp2_1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp2_1
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: select distinct dt from partition_timestamp2_1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+1999-01-01 00:00:00
+1999-01-01 01:00:00
+2000-01-01 00:00:00
+2000-01-01 01:00:00
+PREHOOK: query: select * from partition_timestamp2_1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp2_1
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from partition_timestamp2_1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+238	val_238	1999-01-01 00:00:00	2
+238	val_238	1999-01-01 01:00:00	2
+238	val_238	2000-01-01 00:00:00	1
+238	val_238	2000-01-01 01:00:00	1
+PREHOOK: query: -- insert overwrite
+insert overwrite table partition_timestamp2_1 partition(dt=timestamp '2000-01-01 00:00:00', region=1)
+  select 'changed_key', 'changed_value' from src tablesample (2 rows)
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+POSTHOOK: query: -- insert overwrite
+insert overwrite table partition_timestamp2_1 partition(dt=timestamp '2000-01-01 00:00:00', region=1)
+  select 'changed_key', 'changed_value' from src tablesample (2 rows)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+POSTHOOK: Lineage: partition_timestamp2_1 PARTITION(dt=2000-01-01 00:00:00.0,region=1).key SIMPLE []
+POSTHOOK: Lineage: partition_timestamp2_1 PARTITION(dt=2000-01-01 00:00:00.0,region=1).value SIMPLE []
+PREHOOK: query: select * from partition_timestamp2_1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp2_1
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from partition_timestamp2_1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+238	val_238	1999-01-01 00:00:00	2
+238	val_238	1999-01-01 01:00:00	2
+changed_key	changed_value	2000-01-01 00:00:00	1
+changed_key	changed_value	2000-01-01 00:00:00	1
+238	val_238	2000-01-01 01:00:00	1
+PREHOOK: query: -- truncate
+truncate table partition_timestamp2_1 partition(dt=timestamp '2000-01-01 00:00:00', region=1)
+PREHOOK: type: TRUNCATETABLE
+PREHOOK: Output: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+POSTHOOK: query: -- truncate
+truncate table partition_timestamp2_1 partition(dt=timestamp '2000-01-01 00:00:00', region=1)
+POSTHOOK: type: TRUNCATETABLE
+POSTHOOK: Output: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+PREHOOK: query: select distinct dt from partition_timestamp2_1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp2_1
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: select distinct dt from partition_timestamp2_1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+1999-01-01 00:00:00
+1999-01-01 01:00:00
+2000-01-01 00:00:00
+2000-01-01 01:00:00
+PREHOOK: query: select * from partition_timestamp2_1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp2_1
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from partition_timestamp2_1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+238	val_238	1999-01-01 00:00:00	2
+238	val_238	1999-01-01 01:00:00	2
+238	val_238	2000-01-01 01:00:00	1
+PREHOOK: query: -- alter table add partition
+alter table partition_timestamp2_1 add partition (dt=timestamp '1980-01-02 00:00:00', region=3)
+PREHOOK: type: ALTERTABLE_ADDPARTS
+PREHOOK: Output: default@partition_timestamp2_1
+POSTHOOK: query: -- alter table add partition
+alter table partition_timestamp2_1 add partition (dt=timestamp '1980-01-02 00:00:00', region=3)
+POSTHOOK: type: ALTERTABLE_ADDPARTS
+POSTHOOK: Output: default@partition_timestamp2_1
+POSTHOOK: Output: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+PREHOOK: query: select distinct dt from partition_timestamp2_1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp2_1
+PREHOOK: Input: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: select distinct dt from partition_timestamp2_1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+1980-01-02 00:00:00
+1999-01-01 00:00:00
+1999-01-01 01:00:00
+2000-01-01 00:00:00
+2000-01-01 01:00:00
+PREHOOK: query: select * from partition_timestamp2_1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp2_1
+PREHOOK: Input: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from partition_timestamp2_1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+238	val_238	1999-01-01 00:00:00	2
+238	val_238	1999-01-01 01:00:00	2
+238	val_238	2000-01-01 01:00:00	1
+PREHOOK: query: -- alter table drop
+alter table partition_timestamp2_1 drop partition (dt=timestamp '1999-01-01 01:00:00', region=2)
+PREHOOK: type: ALTERTABLE_DROPPARTS
+PREHOOK: Input: default@partition_timestamp2_1
+PREHOOK: Output: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+POSTHOOK: query: -- alter table drop
+alter table partition_timestamp2_1 drop partition (dt=timestamp '1999-01-01 01:00:00', region=2)
+POSTHOOK: type: ALTERTABLE_DROPPARTS
+POSTHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: Output: default@partition_timestamp2_1@dt=1999-01-01%2001%3A00%3A00.0/region=2
+PREHOOK: query: select distinct dt from partition_timestamp2_1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp2_1
+PREHOOK: Input: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: select distinct dt from partition_timestamp2_1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+1980-01-02 00:00:00
+1999-01-01 00:00:00
+2000-01-01 00:00:00
+2000-01-01 01:00:00
+PREHOOK: query: select * from partition_timestamp2_1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp2_1
+PREHOOK: Input: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from partition_timestamp2_1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+238	val_238	1999-01-01 00:00:00	2
+238	val_238	2000-01-01 01:00:00	1
+PREHOOK: query: -- alter table set serde
+alter table partition_timestamp2_1 partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+  set serde 'org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe'
+PREHOOK: type: ALTERPARTITION_SERIALIZER
+PREHOOK: Input: default@partition_timestamp2_1
+PREHOOK: Output: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+POSTHOOK: query: -- alter table set serde
+alter table partition_timestamp2_1 partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+  set serde 'org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe'
+POSTHOOK: type: ALTERPARTITION_SERIALIZER
+POSTHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+POSTHOOK: Output: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+PREHOOK: query: -- alter table set fileformat
+alter table partition_timestamp2_1 partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+  set fileformat rcfile
+PREHOOK: type: ALTERPARTITION_FILEFORMAT
+PREHOOK: Input: default@partition_timestamp2_1
+PREHOOK: Output: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+POSTHOOK: query: -- alter table set fileformat
+alter table partition_timestamp2_1 partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+  set fileformat rcfile
+POSTHOOK: type: ALTERPARTITION_FILEFORMAT
+POSTHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+POSTHOOK: Output: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+PREHOOK: query: describe extended partition_timestamp2_1  partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: query: describe extended partition_timestamp2_1  partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@partition_timestamp2_1
+key                 	string              	                    
+value               	string              	                    
+dt                  	timestamp           	                    
+region              	int                 	                    
+	 	 
+# Partition Information	 	 
+# col_name            	data_type           	comment             
+	 	 
+dt                  	timestamp           	                    
+region              	int                 	                    
+	 	 
+#### A masked pattern was here ####
+PREHOOK: query: insert overwrite table partition_timestamp2_1 partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+  select * from src tablesample (2 rows)
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+POSTHOOK: query: insert overwrite table partition_timestamp2_1 partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+  select * from src tablesample (2 rows)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+POSTHOOK: Lineage: partition_timestamp2_1 PARTITION(dt=1980-01-02 00:00:00.0,region=3).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: partition_timestamp2_1 PARTITION(dt=1980-01-02 00:00:00.0,region=3).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+PREHOOK: query: select * from partition_timestamp2_1 order by key,value,dt,region
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp2_1
+PREHOOK: Input: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+PREHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+PREHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from partition_timestamp2_1 order by key,value,dt,region
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1999-01-01%2000%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2000%3A00%3A00.0/region=1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+238	val_238	1980-01-02 00:00:00	3
+238	val_238	1999-01-01 00:00:00	2
+238	val_238	2000-01-01 01:00:00	1
+86	val_86	1980-01-02 00:00:00	3
+PREHOOK: query: -- alter table set location
+alter table partition_timestamp2_1 partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+#### A masked pattern was here ####
+PREHOOK: type: ALTERPARTITION_LOCATION
+PREHOOK: Input: default@partition_timestamp2_1
+PREHOOK: Output: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+#### A masked pattern was here ####
+POSTHOOK: query: -- alter table set location
+alter table partition_timestamp2_1 partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+#### A masked pattern was here ####
+POSTHOOK: type: ALTERPARTITION_LOCATION
+POSTHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+POSTHOOK: Output: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+#### A masked pattern was here ####
+PREHOOK: query: describe extended partition_timestamp2_1 partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: query: describe extended partition_timestamp2_1 partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@partition_timestamp2_1
+key                 	string              	                    
+value               	string              	                    
+dt                  	timestamp           	                    
+region              	int                 	                    
+	 	 
+# Partition Information	 	 
+# col_name            	data_type           	comment             
+	 	 
+dt                  	timestamp           	                    
+region              	int                 	                    
+	 	 
+#### A masked pattern was here ####
+PREHOOK: query: -- alter table touch
+alter table partition_timestamp2_1 touch partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+PREHOOK: type: ALTERTABLE_TOUCH
+PREHOOK: Input: default@partition_timestamp2_1
+PREHOOK: Output: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+POSTHOOK: query: -- alter table touch
+alter table partition_timestamp2_1 touch partition(dt=timestamp '1980-01-02 00:00:00', region=3)
+POSTHOOK: type: ALTERTABLE_TOUCH
+POSTHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: Input: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+POSTHOOK: Output: default@partition_timestamp2_1@dt=1980-01-02%2000%3A00%3A00.0/region=3
+PREHOOK: query: drop table partition_timestamp2_1
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@partition_timestamp2_1
+PREHOOK: Output: default@partition_timestamp2_1
+POSTHOOK: query: drop table partition_timestamp2_1
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@partition_timestamp2_1
+POSTHOOK: Output: default@partition_timestamp2_1

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/results/clientpositive/partition_timestamp_win.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/partition_timestamp_win.q.out b/ql/src/test/results/clientpositive/partition_timestamp_win.q.out
new file mode 100755
index 0000000..bbb9773
--- /dev/null
+++ b/ql/src/test/results/clientpositive/partition_timestamp_win.q.out
@@ -0,0 +1,316 @@
+PREHOOK: query: -- Windows-specific test due to space character being escaped in Hive paths on Windows.
+-- INCLUDE_OS_WINDOWS
+drop table partition_timestamp_1
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: -- Windows-specific test due to space character being escaped in Hive paths on Windows.
+-- INCLUDE_OS_WINDOWS
+drop table partition_timestamp_1
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table partition_timestamp_1 (key string, value string) partitioned by (dt timestamp, region string)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@partition_timestamp_1
+POSTHOOK: query: create table partition_timestamp_1 (key string, value string) partitioned by (dt timestamp, region string)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@partition_timestamp_1
+PREHOOK: query: insert overwrite table partition_timestamp_1 partition(dt='2000-01-01 01:00:00', region= '1')
+  select * from src tablesample (10 rows)
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@partition_timestamp_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+POSTHOOK: query: insert overwrite table partition_timestamp_1 partition(dt='2000-01-01 01:00:00', region= '1')
+  select * from src tablesample (10 rows)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@partition_timestamp_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+POSTHOOK: Lineage: partition_timestamp_1 PARTITION(dt=2000-01-01 01:00:00.0,region=1).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: partition_timestamp_1 PARTITION(dt=2000-01-01 01:00:00.0,region=1).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+PREHOOK: query: insert overwrite table partition_timestamp_1 partition(dt='2000-01-01 02:00:00', region= '2')
+  select * from src tablesample (5 rows)
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@partition_timestamp_1@dt=2000-01-01%2002%3A00%3A00.0/region=2
+POSTHOOK: query: insert overwrite table partition_timestamp_1 partition(dt='2000-01-01 02:00:00', region= '2')
+  select * from src tablesample (5 rows)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@partition_timestamp_1@dt=2000-01-01%2002%3A00%3A00.0/region=2
+POSTHOOK: Lineage: partition_timestamp_1 PARTITION(dt=2000-01-01 02:00:00.0,region=2).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: partition_timestamp_1 PARTITION(dt=2000-01-01 02:00:00.0,region=2).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+PREHOOK: query: insert overwrite table partition_timestamp_1 partition(dt='2001-01-01 01:00:00', region= '2020-20-20')
+  select * from src tablesample (5 rows)
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@partition_timestamp_1@dt=2001-01-01%2001%3A00%3A00.0/region=2020-20-20
+POSTHOOK: query: insert overwrite table partition_timestamp_1 partition(dt='2001-01-01 01:00:00', region= '2020-20-20')
+  select * from src tablesample (5 rows)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@partition_timestamp_1@dt=2001-01-01%2001%3A00%3A00.0/region=2020-20-20
+POSTHOOK: Lineage: partition_timestamp_1 PARTITION(dt=2001-01-01 01:00:00.0,region=2020-20-20).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: partition_timestamp_1 PARTITION(dt=2001-01-01 01:00:00.0,region=2020-20-20).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+PREHOOK: query: insert overwrite table partition_timestamp_1 partition(dt='2001-01-01 02:00:00', region= '1')
+  select * from src tablesample (20 rows)
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@partition_timestamp_1@dt=2001-01-01%2002%3A00%3A00.0/region=1
+POSTHOOK: query: insert overwrite table partition_timestamp_1 partition(dt='2001-01-01 02:00:00', region= '1')
+  select * from src tablesample (20 rows)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@partition_timestamp_1@dt=2001-01-01%2002%3A00%3A00.0/region=1
+POSTHOOK: Lineage: partition_timestamp_1 PARTITION(dt=2001-01-01 02:00:00.0,region=1).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: partition_timestamp_1 PARTITION(dt=2001-01-01 02:00:00.0,region=1).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+PREHOOK: query: insert overwrite table partition_timestamp_1 partition(dt='2001-01-01 03:00:00', region= '10')
+  select * from src tablesample (11 rows)
+PREHOOK: type: QUERY
+PREHOOK: Input: default@src
+PREHOOK: Output: default@partition_timestamp_1@dt=2001-01-01%2003%3A00%3A00.0/region=10
+POSTHOOK: query: insert overwrite table partition_timestamp_1 partition(dt='2001-01-01 03:00:00', region= '10')
+  select * from src tablesample (11 rows)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@src
+POSTHOOK: Output: default@partition_timestamp_1@dt=2001-01-01%2003%3A00%3A00.0/region=10
+POSTHOOK: Lineage: partition_timestamp_1 PARTITION(dt=2001-01-01 03:00:00.0,region=10).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ]
+POSTHOOK: Lineage: partition_timestamp_1 PARTITION(dt=2001-01-01 03:00:00.0,region=10).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]
+PREHOOK: query: select distinct dt from partition_timestamp_1
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+PREHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+PREHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2002%3A00%3A00.0/region=2
+PREHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2001%3A00%3A00.0/region=2020-20-20
+PREHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2002%3A00%3A00.0/region=1
+PREHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2003%3A00%3A00.0/region=10
+#### A masked pattern was here ####
+POSTHOOK: query: select distinct dt from partition_timestamp_1
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2002%3A00%3A00.0/region=2
+POSTHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2001%3A00%3A00.0/region=2020-20-20
+POSTHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2002%3A00%3A00.0/region=1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2003%3A00%3A00.0/region=10
+#### A masked pattern was here ####
+2000-01-01 01:00:00
+2000-01-01 02:00:00
+2001-01-01 01:00:00
+2001-01-01 02:00:00
+2001-01-01 03:00:00
+PREHOOK: query: select * from partition_timestamp_1 where dt = '2000-01-01 01:00:00' and region = '2' order by key,value
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+#### A masked pattern was here ####
+POSTHOOK: query: select * from partition_timestamp_1 where dt = '2000-01-01 01:00:00' and region = '2' order by key,value
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+#### A masked pattern was here ####
+PREHOOK: query: -- 10
+select count(*) from partition_timestamp_1 where dt = timestamp '2000-01-01 01:00:00'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+PREHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: -- 10
+select count(*) from partition_timestamp_1 where dt = timestamp '2000-01-01 01:00:00'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+10
+PREHOOK: query: -- 10.  Also try with string value in predicate
+select count(*) from partition_timestamp_1 where dt = '2000-01-01 01:00:00'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+PREHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: -- 10.  Also try with string value in predicate
+select count(*) from partition_timestamp_1 where dt = '2000-01-01 01:00:00'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+10
+PREHOOK: query: -- 5
+select count(*) from partition_timestamp_1 where dt = timestamp '2000-01-01 02:00:00' and region = '2'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+PREHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2002%3A00%3A00.0/region=2
+#### A masked pattern was here ####
+POSTHOOK: query: -- 5
+select count(*) from partition_timestamp_1 where dt = timestamp '2000-01-01 02:00:00' and region = '2'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2002%3A00%3A00.0/region=2
+#### A masked pattern was here ####
+5
+PREHOOK: query: -- 11
+select count(*) from partition_timestamp_1 where dt = timestamp '2001-01-01 03:00:00' and region = '10'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+PREHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2003%3A00%3A00.0/region=10
+#### A masked pattern was here ####
+POSTHOOK: query: -- 11
+select count(*) from partition_timestamp_1 where dt = timestamp '2001-01-01 03:00:00' and region = '10'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2003%3A00%3A00.0/region=10
+#### A masked pattern was here ####
+11
+PREHOOK: query: -- 30
+select count(*) from partition_timestamp_1 where region = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+PREHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+PREHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2002%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: -- 30
+select count(*) from partition_timestamp_1 where region = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2002%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+30
+PREHOOK: query: -- 0
+select count(*) from partition_timestamp_1 where dt = timestamp '2000-01-01 01:00:00' and region = '3'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+#### A masked pattern was here ####
+POSTHOOK: query: -- 0
+select count(*) from partition_timestamp_1 where dt = timestamp '2000-01-01 01:00:00' and region = '3'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+#### A masked pattern was here ####
+0
+PREHOOK: query: -- 0
+select count(*) from partition_timestamp_1 where dt = timestamp '1999-01-01 01:00:00'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+#### A masked pattern was here ####
+POSTHOOK: query: -- 0
+select count(*) from partition_timestamp_1 where dt = timestamp '1999-01-01 01:00:00'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+#### A masked pattern was here ####
+0
+PREHOOK: query: -- Try other comparison operations
+
+-- 20
+select count(*) from partition_timestamp_1 where dt > timestamp '2000-01-01 01:00:00' and region = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+PREHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2002%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: -- Try other comparison operations
+
+-- 20
+select count(*) from partition_timestamp_1 where dt > timestamp '2000-01-01 01:00:00' and region = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2002%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+20
+PREHOOK: query: -- 10
+select count(*) from partition_timestamp_1 where dt < timestamp '2000-01-02 01:00:00' and region = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+PREHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: -- 10
+select count(*) from partition_timestamp_1 where dt < timestamp '2000-01-02 01:00:00' and region = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+10
+PREHOOK: query: -- 20
+select count(*) from partition_timestamp_1 where dt >= timestamp '2000-01-02 01:00:00' and region = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+PREHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2002%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: -- 20
+select count(*) from partition_timestamp_1 where dt >= timestamp '2000-01-02 01:00:00' and region = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2002%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+20
+PREHOOK: query: -- 10
+select count(*) from partition_timestamp_1 where dt <= timestamp '2000-01-01 01:00:00' and region = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+PREHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: -- 10
+select count(*) from partition_timestamp_1 where dt <= timestamp '2000-01-01 01:00:00' and region = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+10
+PREHOOK: query: -- 20
+select count(*) from partition_timestamp_1 where dt <> timestamp '2000-01-01 01:00:00' and region = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+PREHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2002%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: -- 20
+select count(*) from partition_timestamp_1 where dt <> timestamp '2000-01-01 01:00:00' and region = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2002%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+20
+PREHOOK: query: -- 10
+select count(*) from partition_timestamp_1 where dt between timestamp '1999-12-30 12:00:00' and timestamp '2000-01-03 12:00:00' and region = '1'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+PREHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+POSTHOOK: query: -- 10
+select count(*) from partition_timestamp_1 where dt between timestamp '1999-12-30 12:00:00' and timestamp '2000-01-03 12:00:00' and region = '1'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2000-01-01%2001%3A00%3A00.0/region=1
+#### A masked pattern was here ####
+10
+PREHOOK: query: -- Try a string key with timestamp-like strings
+
+-- 5
+select count(*) from partition_timestamp_1 where region = '2020-20-20'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+PREHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2001%3A00%3A00.0/region=2020-20-20
+#### A masked pattern was here ####
+POSTHOOK: query: -- Try a string key with timestamp-like strings
+
+-- 5
+select count(*) from partition_timestamp_1 where region = '2020-20-20'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2001%3A00%3A00.0/region=2020-20-20
+#### A masked pattern was here ####
+5
+PREHOOK: query: -- 5
+select count(*) from partition_timestamp_1 where region > '2010-01-01'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@partition_timestamp_1
+PREHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2001%3A00%3A00.0/region=2020-20-20
+#### A masked pattern was here ####
+POSTHOOK: query: -- 5
+select count(*) from partition_timestamp_1 where region > '2010-01-01'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@partition_timestamp_1
+POSTHOOK: Input: default@partition_timestamp_1@dt=2001-01-01%2001%3A00%3A00.0/region=2020-20-20
+#### A masked pattern was here ####
+5
+PREHOOK: query: drop table partition_timestamp_1
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@partition_timestamp_1
+PREHOOK: Output: default@partition_timestamp_1
+POSTHOOK: query: drop table partition_timestamp_1
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@partition_timestamp_1
+POSTHOOK: Output: default@partition_timestamp_1

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/results/clientpositive/tez/vector_partitioned_date_time.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/tez/vector_partitioned_date_time.q.out b/ql/src/test/results/clientpositive/tez/vector_partitioned_date_time.q.out
index 159c5a7..4b45ac1 100644
--- a/ql/src/test/results/clientpositive/tez/vector_partitioned_date_time.q.out
+++ b/ql/src/test/results/clientpositive/tez/vector_partitioned_date_time.q.out
@@ -1,4 +1,7 @@
-PREHOOK: query: -- Check if vectorization code is handling partitioning on DATE and the other data types.
+PREHOOK: query: -- Exclude test on Windows due to space character being escaped in Hive paths on Windows.
+-- EXCLUDE_OS_WINDOWS
+
+-- Check if vectorization code is handling partitioning on DATE and the other data types.
 
 
 CREATE TABLE flights_tiny (
@@ -11,7 +14,10 @@ CREATE TABLE flights_tiny (
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@flights_tiny
-POSTHOOK: query: -- Check if vectorization code is handling partitioning on DATE and the other data types.
+POSTHOOK: query: -- Exclude test on Windows due to space character being escaped in Hive paths on Windows.
+-- EXCLUDE_OS_WINDOWS
+
+-- Check if vectorization code is handling partitioning on DATE and the other data types.
 
 
 CREATE TABLE flights_tiny (

http://git-wip-us.apache.org/repos/asf/hive/blob/c8a41f1c/ql/src/test/results/clientpositive/vector_partitioned_date_time.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/vector_partitioned_date_time.q.out b/ql/src/test/results/clientpositive/vector_partitioned_date_time.q.out
index a3f7219..83e7f19 100644
--- a/ql/src/test/results/clientpositive/vector_partitioned_date_time.q.out
+++ b/ql/src/test/results/clientpositive/vector_partitioned_date_time.q.out
@@ -1,4 +1,7 @@
-PREHOOK: query: -- Check if vectorization code is handling partitioning on DATE and the other data types.
+PREHOOK: query: -- Exclude test on Windows due to space character being escaped in Hive paths on Windows.
+-- EXCLUDE_OS_WINDOWS
+
+-- Check if vectorization code is handling partitioning on DATE and the other data types.
 
 
 CREATE TABLE flights_tiny (
@@ -11,7 +14,10 @@ CREATE TABLE flights_tiny (
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@flights_tiny
-POSTHOOK: query: -- Check if vectorization code is handling partitioning on DATE and the other data types.
+POSTHOOK: query: -- Exclude test on Windows due to space character being escaped in Hive paths on Windows.
+-- EXCLUDE_OS_WINDOWS
+
+-- Check if vectorization code is handling partitioning on DATE and the other data types.
 
 
 CREATE TABLE flights_tiny (


Mime
View raw message