diff --git ql/src/test/queries/clientpositive/orc_ppd_timestamp.q ql/src/test/queries/clientpositive/orc_ppd_timestamp.q index dafd6cf..fa4cbba 100644 --- ql/src/test/queries/clientpositive/orc_ppd_timestamp.q +++ ql/src/test/queries/clientpositive/orc_ppd_timestamp.q @@ -7,10 +7,10 @@ create table newtypesorc(c char(10), v varchar(10), d decimal(5,3), ts timestamp insert overwrite table newtypesorc select * from (select cast("apple" as char(10)), cast("bee" as varchar(10)), 0.22, cast("2011-01-01 01:01:01" as timestamp) from src src1 union all select cast("hello" as char(10)), cast("world" as varchar(10)), 11.22, cast("2011-01-20 01:01:01" as timestamp) from src src2) uniontbl; -- timestamp data types (EQUAL, NOT_EQUAL, LESS_THAN, LESS_THAN_EQUALS, IN, BETWEEN tests) -select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01'; +select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01.0'; set hive.optimize.index.filter=true; -select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01'; +select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01.0'; set hive.optimize.index.filter=false; select sum(hash(*)) from newtypesorc where ts=cast('2011-01-01 01:01:01' as timestamp); diff --git ql/src/test/queries/clientpositive/parquet_ppd_timestamp.q ql/src/test/queries/clientpositive/parquet_ppd_timestamp.q index 1b9f6ff..158fe74 100644 --- ql/src/test/queries/clientpositive/parquet_ppd_timestamp.q +++ ql/src/test/queries/clientpositive/parquet_ppd_timestamp.q @@ -8,10 +8,10 @@ create table newtypestbl(c char(10), v varchar(10), d decimal(5,3), ts timestamp insert overwrite table newtypestbl select * from (select cast("apple" as char(10)), cast("bee" as varchar(10)), 0.22, cast("2011-01-01 01:01:01" as timestamp) from src src1 union all select cast("hello" as char(10)), cast("world" as varchar(10)), 11.22, cast("2011-01-20 01:01:01" as timestamp) from src src2 limit 10) uniontbl; -- timestamp data types (EQUAL, NOT_EQUAL, LESS_THAN, LESS_THAN_EQUALS, IN, BETWEEN tests) -select * from newtypestbl where cast(ts as string)='2011-01-01 01:01:01'; +select * from newtypestbl where cast(ts as string)='2011-01-01 01:01:01.0'; set hive.optimize.index.filter=true; -select * from newtypestbl where cast(ts as string)='2011-01-01 01:01:01'; +select * from newtypestbl where cast(ts as string)='2011-01-01 01:01:01.0'; set hive.optimize.index.filter=false; select * from newtypestbl where ts=cast('2011-01-01 01:01:01' as timestamp); diff --git ql/src/test/results/clientpositive/char_cast.q.out ql/src/test/results/clientpositive/char_cast.q.out index 9b337af..d2e860d 100644 --- ql/src/test/results/clientpositive/char_cast.q.out +++ ql/src/test/results/clientpositive/char_cast.q.out @@ -62,7 +62,7 @@ from src limit 1 POSTHOOK: type: QUERY POSTHOOK: Input: default@src #### A masked pattern was here #### -2011-01-01 2011-01-01 01:02:03 +2011-01-01 2011-01-01 01:02:03.0 PREHOOK: query: select cast(cast('2011-01-01' as char(10)) as date), cast(cast('2011-01-01 01:02:03' as char(30)) as timestamp) @@ -77,7 +77,7 @@ from src limit 1 POSTHOOK: type: QUERY POSTHOOK: Input: default@src #### A masked pattern was here #### -2011-01-01 2011-01-01 01:02:03 +2011-01-01 2011-01-01 01:02:03.0 PREHOOK: query: select cast(cast('abc123' as string) as string), cast(cast('abc123' as string) as varchar(10)), @@ -193,7 +193,7 @@ from src limit 1 POSTHOOK: type: QUERY POSTHOOK: Input: default@src #### A masked pattern was here #### -2011-01-01 2011-01-01 01:02:03 +2011-01-01 2011-01-01 01:02:03.0 PREHOOK: query: select cast(date '2011-01-01' as char(10)), cast(timestamp('2011-01-01 01:02:03') as char(30)) @@ -208,7 +208,7 @@ from src limit 1 POSTHOOK: type: QUERY POSTHOOK: Input: default@src #### A masked pattern was here #### -2011-01-01 2011-01-01 01:02:03 +2011-01-01 2011-01-01 01:02:03.0 PREHOOK: query: select cast(true as string), cast(false as string) diff --git ql/src/test/results/clientpositive/date_1.q.out ql/src/test/results/clientpositive/date_1.q.out index 4ec31b4..53f34ae 100644 --- ql/src/test/results/clientpositive/date_1.q.out +++ ql/src/test/results/clientpositive/date_1.q.out @@ -117,7 +117,7 @@ from date_1 limit 1 POSTHOOK: type: QUERY POSTHOOK: Input: default@date_1 #### A masked pattern was here #### -2012-01-01 2011-01-01 2011-01-01 00:00:00 2011-01-01 2011-01-01 +2012-01-01 2011-01-01 2011-01-01 00:00:00.0 2011-01-01 2011-01-01 PREHOOK: query: select cast(d as boolean), cast(d as tinyint), diff --git ql/src/test/results/clientpositive/date_udf.q.out ql/src/test/results/clientpositive/date_udf.q.out index 37ad29e..9b5ab95 100644 --- ql/src/test/results/clientpositive/date_udf.q.out +++ ql/src/test/results/clientpositive/date_udf.q.out @@ -190,7 +190,7 @@ POSTHOOK: query: select POSTHOOK: type: QUERY POSTHOOK: Input: default@date_udf #### A masked pattern was here #### -1970-01-01 08:00:00 1969-12-31 16:00:00 2013-06-19 07:00:00 2013-06-18 17:00:00 +1970-01-01 08:00:00.0 1969-12-31 16:00:00.0 2013-06-19 07:00:00.0 2013-06-18 17:00:00.0 PREHOOK: query: select to_utc_timestamp(date '1970-01-01', 'America/Los_Angeles') = to_utc_timestamp(timestamp('1970-01-01 00:00:00'), 'America/Los_Angeles'), from_utc_timestamp(date '1970-01-01', 'America/Los_Angeles') = from_utc_timestamp(timestamp('1970-01-01 00:00:00'), 'America/Los_Angeles'), diff --git ql/src/test/results/clientpositive/insert_values_non_partitioned.q.out ql/src/test/results/clientpositive/insert_values_non_partitioned.q.out index 189f50d..0c714df 100644 --- ql/src/test/results/clientpositive/insert_values_non_partitioned.q.out +++ ql/src/test/results/clientpositive/insert_values_non_partitioned.q.out @@ -64,5 +64,5 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@acid_ivnp #### A masked pattern was here #### NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -1 257 65537 4294967297 3.14 3.141592654 109.23 2014-08-25 17:21:30 2014-08-25 true mary had a little lamb ring around the rosie red -3 25 6553 NULL 0.14 1923.141592654 1.23 2014-08-24 17:21:30 2014-08-26 false its fleece was white as snow a pocket full of posies blue +1 257 65537 4294967297 3.14 3.141592654 109.23 2014-08-25 17:21:30.0 2014-08-25 true mary had a little lamb ring around the rosie red +3 25 6553 NULL 0.14 1923.141592654 1.23 2014-08-24 17:21:30.0 2014-08-26 false its fleece was white as snow a pocket full of posies blue diff --git ql/src/test/results/clientpositive/insert_values_partitioned.q.out ql/src/test/results/clientpositive/insert_values_partitioned.q.out index 48dfadc..20dff67a 100644 --- ql/src/test/results/clientpositive/insert_values_partitioned.q.out +++ ql/src/test/results/clientpositive/insert_values_partitioned.q.out @@ -60,5 +60,5 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@acid_ivp POSTHOOK: Input: default@acid_ivp@ds=today #### A masked pattern was here #### -3 25 6553 429496729 0.14 1923.141592654 1.23 2014-08-24 17:21:30 2014-08-26 its fleece was white as snow a pocket full of posies blue today -1 257 65537 4294967297 3.14 3.141592654 109.23 2014-08-25 17:21:30 2014-08-25 mary had a little lamb ring around the rosie red today +3 25 6553 429496729 0.14 1923.141592654 1.23 2014-08-24 17:21:30.0 2014-08-26 its fleece was white as snow a pocket full of posies blue today +1 257 65537 4294967297 3.14 3.141592654 109.23 2014-08-25 17:21:30.0 2014-08-25 mary had a little lamb ring around the rosie red today diff --git ql/src/test/results/clientpositive/llap/current_date_timestamp.q.out ql/src/test/results/clientpositive/llap/current_date_timestamp.q.out index 98ede4e..b15ff26 100644 --- ql/src/test/results/clientpositive/llap/current_date_timestamp.q.out +++ ql/src/test/results/clientpositive/llap/current_date_timestamp.q.out @@ -351,11 +351,11 @@ POSTHOOK: query: select current_date, current_timestamp from src limit 5 POSTHOOK: type: QUERY POSTHOOK: Input: default@src #### A masked pattern was here #### -2012-01-01 2012-01-01 01:02:03 -2012-01-01 2012-01-01 01:02:03 -2012-01-01 2012-01-01 01:02:03 -2012-01-01 2012-01-01 01:02:03 -2012-01-01 2012-01-01 01:02:03 +2012-01-01 2012-01-01 01:02:03.0 +2012-01-01 2012-01-01 01:02:03.0 +2012-01-01 2012-01-01 01:02:03.0 +2012-01-01 2012-01-01 01:02:03.0 +2012-01-01 2012-01-01 01:02:03.0 PREHOOK: query: select `[kv]+.+` from srcpart order by key PREHOOK: type: QUERY PREHOOK: Input: default@srcpart diff --git ql/src/test/results/clientpositive/llap/orc_ppd_timestamp.q.out ql/src/test/results/clientpositive/llap/orc_ppd_timestamp.q.out index ab65906..55b623f 100644 --- ql/src/test/results/clientpositive/llap/orc_ppd_timestamp.q.out +++ ql/src/test/results/clientpositive/llap/orc_ppd_timestamp.q.out @@ -18,20 +18,20 @@ POSTHOOK: Lineage: newtypesorc.c EXPRESSION [] POSTHOOK: Lineage: newtypesorc.d EXPRESSION [] POSTHOOK: Lineage: newtypesorc.ts EXPRESSION [] POSTHOOK: Lineage: newtypesorc.v EXPRESSION [] -PREHOOK: query: select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01' +PREHOOK: query: select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01.0' PREHOOK: type: QUERY PREHOOK: Input: default@newtypesorc #### A masked pattern was here #### -POSTHOOK: query: select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01' +POSTHOOK: query: select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01.0' POSTHOOK: type: QUERY POSTHOOK: Input: default@newtypesorc #### A masked pattern was here #### 445653015500 -PREHOOK: query: select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01' +PREHOOK: query: select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01.0' PREHOOK: type: QUERY PREHOOK: Input: default@newtypesorc #### A masked pattern was here #### -POSTHOOK: query: select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01' +POSTHOOK: query: select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01.0' POSTHOOK: type: QUERY POSTHOOK: Input: default@newtypesorc #### A masked pattern was here #### diff --git ql/src/test/results/clientpositive/orc_merge5.q.out ql/src/test/results/clientpositive/orc_merge5.q.out index e845186..1e193fa 100644 --- ql/src/test/results/clientpositive/orc_merge5.q.out +++ ql/src/test/results/clientpositive/orc_merge5.q.out @@ -99,9 +99,9 @@ POSTHOOK: query: select * from orc_merge5b POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_merge5b #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 -2 foo 0.8 1 1969-12-31 16:00:00 -5 eat 0.8 6 1969-12-31 16:00:20 +13 bar 80.0 2 1969-12-31 16:00:05.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 PREHOOK: query: explain insert overwrite table orc_merge5b select userid,string1,subtype,decimal1,ts from orc_merge5 where userid<=13 PREHOOK: type: QUERY POSTHOOK: query: explain insert overwrite table orc_merge5b select userid,string1,subtype,decimal1,ts from orc_merge5 where userid<=13 @@ -213,9 +213,9 @@ POSTHOOK: query: select * from orc_merge5b POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_merge5b #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 -2 foo 0.8 1 1969-12-31 16:00:00 -5 eat 0.8 6 1969-12-31 16:00:20 +13 bar 80.0 2 1969-12-31 16:00:05.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 PREHOOK: query: insert overwrite table orc_merge5b select userid,string1,subtype,decimal1,ts from orc_merge5 where userid<=13 PREHOOK: type: QUERY PREHOOK: Input: default@orc_merge5 @@ -247,9 +247,9 @@ POSTHOOK: query: select * from orc_merge5b POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_merge5b #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 -2 foo 0.8 1 1969-12-31 16:00:00 -5 eat 0.8 6 1969-12-31 16:00:20 +13 bar 80.0 2 1969-12-31 16:00:05.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 PREHOOK: query: explain alter table orc_merge5b concatenate PREHOOK: type: ALTER_TABLE_MERGE POSTHOOK: query: explain alter table orc_merge5b concatenate @@ -301,6 +301,6 @@ POSTHOOK: query: select * from orc_merge5b POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_merge5b #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 -2 foo 0.8 1 1969-12-31 16:00:00 -5 eat 0.8 6 1969-12-31 16:00:20 +13 bar 80.0 2 1969-12-31 16:00:05.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 diff --git ql/src/test/results/clientpositive/orc_merge6.q.out ql/src/test/results/clientpositive/orc_merge6.q.out index 5ece361..f686aeb 100644 --- ql/src/test/results/clientpositive/orc_merge6.q.out +++ ql/src/test/results/clientpositive/orc_merge6.q.out @@ -141,12 +141,12 @@ POSTHOOK: Input: default@orc_merge5a POSTHOOK: Input: default@orc_merge5a@year=2000/hour=24 POSTHOOK: Input: default@orc_merge5a@year=2001/hour=24 #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 2000 24 -13 bar 80.0 2 1969-12-31 16:00:05 2001 24 -2 foo 0.8 1 1969-12-31 16:00:00 2000 24 -2 foo 0.8 1 1969-12-31 16:00:00 2001 24 -5 eat 0.8 6 1969-12-31 16:00:20 2000 24 -5 eat 0.8 6 1969-12-31 16:00:20 2001 24 +13 bar 80.0 2 1969-12-31 16:00:05.0 2000 24 +13 bar 80.0 2 1969-12-31 16:00:05.0 2001 24 +2 foo 0.8 1 1969-12-31 16:00:00.0 2000 24 +2 foo 0.8 1 1969-12-31 16:00:00.0 2001 24 +5 eat 0.8 6 1969-12-31 16:00:20.0 2000 24 +5 eat 0.8 6 1969-12-31 16:00:20.0 2001 24 PREHOOK: query: explain insert overwrite table orc_merge5a partition (year="2000",hour=24) select userid,string1,subtype,decimal1,ts from orc_merge5 where userid<=13 PREHOOK: type: QUERY POSTHOOK: query: explain insert overwrite table orc_merge5a partition (year="2000",hour=24) select userid,string1,subtype,decimal1,ts from orc_merge5 where userid<=13 @@ -300,12 +300,12 @@ POSTHOOK: Input: default@orc_merge5a POSTHOOK: Input: default@orc_merge5a@year=2000/hour=24 POSTHOOK: Input: default@orc_merge5a@year=2001/hour=24 #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 2000 24 -13 bar 80.0 2 1969-12-31 16:00:05 2001 24 -2 foo 0.8 1 1969-12-31 16:00:00 2000 24 -2 foo 0.8 1 1969-12-31 16:00:00 2001 24 -5 eat 0.8 6 1969-12-31 16:00:20 2000 24 -5 eat 0.8 6 1969-12-31 16:00:20 2001 24 +13 bar 80.0 2 1969-12-31 16:00:05.0 2000 24 +13 bar 80.0 2 1969-12-31 16:00:05.0 2001 24 +2 foo 0.8 1 1969-12-31 16:00:00.0 2000 24 +2 foo 0.8 1 1969-12-31 16:00:00.0 2001 24 +5 eat 0.8 6 1969-12-31 16:00:20.0 2000 24 +5 eat 0.8 6 1969-12-31 16:00:20.0 2001 24 PREHOOK: query: insert overwrite table orc_merge5a partition (year="2000",hour=24) select userid,string1,subtype,decimal1,ts from orc_merge5 where userid<=13 PREHOOK: type: QUERY PREHOOK: Input: default@orc_merge5 @@ -376,12 +376,12 @@ POSTHOOK: Input: default@orc_merge5a POSTHOOK: Input: default@orc_merge5a@year=2000/hour=24 POSTHOOK: Input: default@orc_merge5a@year=2001/hour=24 #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 2000 24 -13 bar 80.0 2 1969-12-31 16:00:05 2001 24 -2 foo 0.8 1 1969-12-31 16:00:00 2000 24 -2 foo 0.8 1 1969-12-31 16:00:00 2001 24 -5 eat 0.8 6 1969-12-31 16:00:20 2000 24 -5 eat 0.8 6 1969-12-31 16:00:20 2001 24 +13 bar 80.0 2 1969-12-31 16:00:05.0 2000 24 +13 bar 80.0 2 1969-12-31 16:00:05.0 2001 24 +2 foo 0.8 1 1969-12-31 16:00:00.0 2000 24 +2 foo 0.8 1 1969-12-31 16:00:00.0 2001 24 +5 eat 0.8 6 1969-12-31 16:00:20.0 2000 24 +5 eat 0.8 6 1969-12-31 16:00:20.0 2001 24 PREHOOK: query: explain alter table orc_merge5a partition(year="2000",hour=24) concatenate PREHOOK: type: ALTER_PARTITION_MERGE POSTHOOK: query: explain alter table orc_merge5a partition(year="2000",hour=24) concatenate @@ -470,9 +470,9 @@ POSTHOOK: Input: default@orc_merge5a POSTHOOK: Input: default@orc_merge5a@year=2000/hour=24 POSTHOOK: Input: default@orc_merge5a@year=2001/hour=24 #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 2000 24 -13 bar 80.0 2 1969-12-31 16:00:05 2001 24 -2 foo 0.8 1 1969-12-31 16:00:00 2000 24 -2 foo 0.8 1 1969-12-31 16:00:00 2001 24 -5 eat 0.8 6 1969-12-31 16:00:20 2000 24 -5 eat 0.8 6 1969-12-31 16:00:20 2001 24 +13 bar 80.0 2 1969-12-31 16:00:05.0 2000 24 +13 bar 80.0 2 1969-12-31 16:00:05.0 2001 24 +2 foo 0.8 1 1969-12-31 16:00:00.0 2000 24 +2 foo 0.8 1 1969-12-31 16:00:00.0 2001 24 +5 eat 0.8 6 1969-12-31 16:00:20.0 2000 24 +5 eat 0.8 6 1969-12-31 16:00:20.0 2001 24 diff --git ql/src/test/results/clientpositive/orc_merge7.q.out ql/src/test/results/clientpositive/orc_merge7.q.out index beff0ed..132afee 100644 --- ql/src/test/results/clientpositive/orc_merge7.q.out +++ ql/src/test/results/clientpositive/orc_merge7.q.out @@ -387,9 +387,9 @@ POSTHOOK: Input: default@orc_merge5a@st=1.8 POSTHOOK: Input: default@orc_merge5a@st=8.0 POSTHOOK: Input: default@orc_merge5a@st=80.0 #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 80.0 -2 foo 0.8 1 1969-12-31 16:00:00 0.8 -5 eat 0.8 6 1969-12-31 16:00:20 0.8 +13 bar 80.0 2 1969-12-31 16:00:05.0 80.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 0.8 +5 eat 0.8 6 1969-12-31 16:00:20.0 0.8 PREHOOK: query: insert overwrite table orc_merge5a partition (st) select userid,string1,subtype,decimal1,ts,subtype from orc_merge5 PREHOOK: type: QUERY PREHOOK: Input: default@orc_merge5 @@ -502,9 +502,9 @@ POSTHOOK: Input: default@orc_merge5a@st=1.8 POSTHOOK: Input: default@orc_merge5a@st=8.0 POSTHOOK: Input: default@orc_merge5a@st=80.0 #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 80.0 -2 foo 0.8 1 1969-12-31 16:00:00 0.8 -5 eat 0.8 6 1969-12-31 16:00:20 0.8 +13 bar 80.0 2 1969-12-31 16:00:05.0 80.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 0.8 +5 eat 0.8 6 1969-12-31 16:00:20.0 0.8 PREHOOK: query: explain alter table orc_merge5a partition(st=80.0) concatenate PREHOOK: type: ALTER_PARTITION_MERGE POSTHOOK: query: explain alter table orc_merge5a partition(st=80.0) concatenate @@ -600,6 +600,6 @@ POSTHOOK: Input: default@orc_merge5a@st=1.8 POSTHOOK: Input: default@orc_merge5a@st=8.0 POSTHOOK: Input: default@orc_merge5a@st=80.0 #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 80.0 -2 foo 0.8 1 1969-12-31 16:00:00 0.8 -5 eat 0.8 6 1969-12-31 16:00:20 0.8 +13 bar 80.0 2 1969-12-31 16:00:05.0 80.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 0.8 +5 eat 0.8 6 1969-12-31 16:00:20.0 0.8 diff --git ql/src/test/results/clientpositive/orc_merge_incompat1.q.out ql/src/test/results/clientpositive/orc_merge_incompat1.q.out index fcf1c68..3d436f8 100644 --- ql/src/test/results/clientpositive/orc_merge_incompat1.q.out +++ ql/src/test/results/clientpositive/orc_merge_incompat1.q.out @@ -163,24 +163,24 @@ POSTHOOK: query: select * from orc_merge5b POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_merge5b #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 -13 bar 80.0 2 1969-12-31 16:00:05 -13 bar 80.0 2 1969-12-31 16:00:05 -13 bar 80.0 2 1969-12-31 16:00:05 -13 bar 80.0 2 1969-12-31 16:00:05 -13 bar 80.0 2 1969-12-31 16:00:05 -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 -5 eat 0.8 6 1969-12-31 16:00:20 -5 eat 0.8 6 1969-12-31 16:00:20 -5 eat 0.8 6 1969-12-31 16:00:20 -5 eat 0.8 6 1969-12-31 16:00:20 -5 eat 0.8 6 1969-12-31 16:00:20 -5 eat 0.8 6 1969-12-31 16:00:20 +13 bar 80.0 2 1969-12-31 16:00:05.0 +13 bar 80.0 2 1969-12-31 16:00:05.0 +13 bar 80.0 2 1969-12-31 16:00:05.0 +13 bar 80.0 2 1969-12-31 16:00:05.0 +13 bar 80.0 2 1969-12-31 16:00:05.0 +13 bar 80.0 2 1969-12-31 16:00:05.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 PREHOOK: query: alter table orc_merge5b concatenate PREHOOK: type: ALTER_TABLE_MERGE PREHOOK: Input: default@orc_merge5b @@ -207,21 +207,21 @@ POSTHOOK: query: select * from orc_merge5b POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_merge5b #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 -13 bar 80.0 2 1969-12-31 16:00:05 -13 bar 80.0 2 1969-12-31 16:00:05 -13 bar 80.0 2 1969-12-31 16:00:05 -13 bar 80.0 2 1969-12-31 16:00:05 -13 bar 80.0 2 1969-12-31 16:00:05 -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 -5 eat 0.8 6 1969-12-31 16:00:20 -5 eat 0.8 6 1969-12-31 16:00:20 -5 eat 0.8 6 1969-12-31 16:00:20 -5 eat 0.8 6 1969-12-31 16:00:20 -5 eat 0.8 6 1969-12-31 16:00:20 -5 eat 0.8 6 1969-12-31 16:00:20 +13 bar 80.0 2 1969-12-31 16:00:05.0 +13 bar 80.0 2 1969-12-31 16:00:05.0 +13 bar 80.0 2 1969-12-31 16:00:05.0 +13 bar 80.0 2 1969-12-31 16:00:05.0 +13 bar 80.0 2 1969-12-31 16:00:05.0 +13 bar 80.0 2 1969-12-31 16:00:05.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 diff --git ql/src/test/results/clientpositive/orc_merge_incompat2.q.out ql/src/test/results/clientpositive/orc_merge_incompat2.q.out index a27041f..55e0fdd 100644 --- ql/src/test/results/clientpositive/orc_merge_incompat2.q.out +++ ql/src/test/results/clientpositive/orc_merge_incompat2.q.out @@ -240,18 +240,18 @@ POSTHOOK: Input: default@orc_merge5a@st=1.8 POSTHOOK: Input: default@orc_merge5a@st=8.0 POSTHOOK: Input: default@orc_merge5a@st=80.0 #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 80.0 -13 bar 80.0 2 1969-12-31 16:00:05 80.0 -13 bar 80.0 2 1969-12-31 16:00:05 80.0 -13 bar 80.0 2 1969-12-31 16:00:05 80.0 -2 foo 0.8 1 1969-12-31 16:00:00 0.8 -2 foo 0.8 1 1969-12-31 16:00:00 0.8 -2 foo 0.8 1 1969-12-31 16:00:00 0.8 -2 foo 0.8 1 1969-12-31 16:00:00 0.8 -5 eat 0.8 6 1969-12-31 16:00:20 0.8 -5 eat 0.8 6 1969-12-31 16:00:20 0.8 -5 eat 0.8 6 1969-12-31 16:00:20 0.8 -5 eat 0.8 6 1969-12-31 16:00:20 0.8 +13 bar 80.0 2 1969-12-31 16:00:05.0 80.0 +13 bar 80.0 2 1969-12-31 16:00:05.0 80.0 +13 bar 80.0 2 1969-12-31 16:00:05.0 80.0 +13 bar 80.0 2 1969-12-31 16:00:05.0 80.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 0.8 +2 foo 0.8 1 1969-12-31 16:00:00.0 0.8 +2 foo 0.8 1 1969-12-31 16:00:00.0 0.8 +2 foo 0.8 1 1969-12-31 16:00:00.0 0.8 +5 eat 0.8 6 1969-12-31 16:00:20.0 0.8 +5 eat 0.8 6 1969-12-31 16:00:20.0 0.8 +5 eat 0.8 6 1969-12-31 16:00:20.0 0.8 +5 eat 0.8 6 1969-12-31 16:00:20.0 0.8 PREHOOK: query: explain alter table orc_merge5a partition(st=80.0) concatenate PREHOOK: type: ALTER_PARTITION_MERGE POSTHOOK: query: explain alter table orc_merge5a partition(st=80.0) concatenate @@ -345,15 +345,15 @@ POSTHOOK: Input: default@orc_merge5a@st=1.8 POSTHOOK: Input: default@orc_merge5a@st=8.0 POSTHOOK: Input: default@orc_merge5a@st=80.0 #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 80.0 -13 bar 80.0 2 1969-12-31 16:00:05 80.0 -13 bar 80.0 2 1969-12-31 16:00:05 80.0 -13 bar 80.0 2 1969-12-31 16:00:05 80.0 -2 foo 0.8 1 1969-12-31 16:00:00 0.8 -2 foo 0.8 1 1969-12-31 16:00:00 0.8 -2 foo 0.8 1 1969-12-31 16:00:00 0.8 -2 foo 0.8 1 1969-12-31 16:00:00 0.8 -5 eat 0.8 6 1969-12-31 16:00:20 0.8 -5 eat 0.8 6 1969-12-31 16:00:20 0.8 -5 eat 0.8 6 1969-12-31 16:00:20 0.8 -5 eat 0.8 6 1969-12-31 16:00:20 0.8 +13 bar 80.0 2 1969-12-31 16:00:05.0 80.0 +13 bar 80.0 2 1969-12-31 16:00:05.0 80.0 +13 bar 80.0 2 1969-12-31 16:00:05.0 80.0 +13 bar 80.0 2 1969-12-31 16:00:05.0 80.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 0.8 +2 foo 0.8 1 1969-12-31 16:00:00.0 0.8 +2 foo 0.8 1 1969-12-31 16:00:00.0 0.8 +2 foo 0.8 1 1969-12-31 16:00:00.0 0.8 +5 eat 0.8 6 1969-12-31 16:00:20.0 0.8 +5 eat 0.8 6 1969-12-31 16:00:20.0 0.8 +5 eat 0.8 6 1969-12-31 16:00:20.0 0.8 +5 eat 0.8 6 1969-12-31 16:00:20.0 0.8 diff --git ql/src/test/results/clientpositive/orc_ppd_timestamp.q.out ql/src/test/results/clientpositive/orc_ppd_timestamp.q.out index f1030a9..880a35f 100644 --- ql/src/test/results/clientpositive/orc_ppd_timestamp.q.out +++ ql/src/test/results/clientpositive/orc_ppd_timestamp.q.out @@ -19,21 +19,21 @@ POSTHOOK: Lineage: newtypesorc.d EXPRESSION [] POSTHOOK: Lineage: newtypesorc.ts EXPRESSION [] POSTHOOK: Lineage: newtypesorc.v EXPRESSION [] PREHOOK: query: -- timestamp data types (EQUAL, NOT_EQUAL, LESS_THAN, LESS_THAN_EQUALS, IN, BETWEEN tests) -select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01' +select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01.0' PREHOOK: type: QUERY PREHOOK: Input: default@newtypesorc #### A masked pattern was here #### POSTHOOK: query: -- timestamp data types (EQUAL, NOT_EQUAL, LESS_THAN, LESS_THAN_EQUALS, IN, BETWEEN tests) -select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01' +select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01.0' POSTHOOK: type: QUERY POSTHOOK: Input: default@newtypesorc #### A masked pattern was here #### 445653015500 -PREHOOK: query: select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01' +PREHOOK: query: select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01.0' PREHOOK: type: QUERY PREHOOK: Input: default@newtypesorc #### A masked pattern was here #### -POSTHOOK: query: select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01' +POSTHOOK: query: select sum(hash(*)) from newtypesorc where cast(ts as string)='2011-01-01 01:01:01.0' POSTHOOK: type: QUERY POSTHOOK: Input: default@newtypesorc #### A masked pattern was here #### diff --git ql/src/test/results/clientpositive/orc_split_elimination.q.out ql/src/test/results/clientpositive/orc_split_elimination.q.out index 7134ff5..e48a698 100644 --- ql/src/test/results/clientpositive/orc_split_elimination.q.out +++ ql/src/test/results/clientpositive/orc_split_elimination.q.out @@ -166,8 +166,8 @@ select userid,string1,subtype,decimal1,ts from orc_split_elim where userid<=5 POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_split_elim #### A masked pattern was here #### -2 foo 0.8 1 1969-12-31 16:00:00 -5 eat 0.8 6 1969-12-31 16:00:20 +2 foo 0.8 1 1969-12-31 16:00:00.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 PREHOOK: query: -- 2 mappers select userid,string1,subtype,decimal1,ts from orc_split_elim where userid<=5 PREHOOK: type: QUERY @@ -178,8 +178,8 @@ select userid,string1,subtype,decimal1,ts from orc_split_elim where userid<=5 POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_split_elim #### A masked pattern was here #### -2 foo 0.8 1 1969-12-31 16:00:00 -5 eat 0.8 6 1969-12-31 16:00:20 +2 foo 0.8 1 1969-12-31 16:00:00.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 PREHOOK: query: -- 5 mappers select userid,string1,subtype,decimal1,ts from orc_split_elim where userid<=13 PREHOOK: type: QUERY @@ -190,9 +190,9 @@ select userid,string1,subtype,decimal1,ts from orc_split_elim where userid<=13 POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_split_elim #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 -2 foo 0.8 1 1969-12-31 16:00:00 -5 eat 0.8 6 1969-12-31 16:00:20 +13 bar 80.0 2 1969-12-31 16:00:05.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 PREHOOK: query: -- 3 mappers select userid,string1,subtype,decimal1,ts from orc_split_elim where userid<=13 PREHOOK: type: QUERY @@ -203,9 +203,9 @@ select userid,string1,subtype,decimal1,ts from orc_split_elim where userid<=13 POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_split_elim #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 -2 foo 0.8 1 1969-12-31 16:00:00 -5 eat 0.8 6 1969-12-31 16:00:20 +13 bar 80.0 2 1969-12-31 16:00:05.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 PREHOOK: query: -- 5 mappers select userid,string1,subtype,decimal1,ts from orc_split_elim where userid<=29 PREHOOK: type: QUERY @@ -216,10 +216,10 @@ select userid,string1,subtype,decimal1,ts from orc_split_elim where userid<=29 POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_split_elim #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 -2 foo 0.8 1 1969-12-31 16:00:00 -29 cat 8.0 3 1969-12-31 16:00:10 -5 eat 0.8 6 1969-12-31 16:00:20 +13 bar 80.0 2 1969-12-31 16:00:05.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +29 cat 8.0 3 1969-12-31 16:00:10.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 PREHOOK: query: -- 4 mappers select userid,string1,subtype,decimal1,ts from orc_split_elim where userid<=29 PREHOOK: type: QUERY @@ -230,10 +230,10 @@ select userid,string1,subtype,decimal1,ts from orc_split_elim where userid<=29 POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_split_elim #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 -2 foo 0.8 1 1969-12-31 16:00:00 -29 cat 8.0 3 1969-12-31 16:00:10 -5 eat 0.8 6 1969-12-31 16:00:20 +13 bar 80.0 2 1969-12-31 16:00:05.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +29 cat 8.0 3 1969-12-31 16:00:10.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 PREHOOK: query: -- 5 mappers select userid,string1,subtype,decimal1,ts from orc_split_elim where userid<=70 PREHOOK: type: QUERY @@ -244,11 +244,11 @@ select userid,string1,subtype,decimal1,ts from orc_split_elim where userid<=70 POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_split_elim #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 -2 foo 0.8 1 1969-12-31 16:00:00 -29 cat 8.0 3 1969-12-31 16:00:10 -5 eat 0.8 6 1969-12-31 16:00:20 -70 dog 1.8 4 1969-12-31 16:00:15 +13 bar 80.0 2 1969-12-31 16:00:05.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +29 cat 8.0 3 1969-12-31 16:00:10.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 +70 dog 1.8 4 1969-12-31 16:00:15.0 PREHOOK: query: -- 5 mappers select userid,string1,subtype,decimal1,ts from orc_split_elim where userid<=70 PREHOOK: type: QUERY @@ -259,11 +259,11 @@ select userid,string1,subtype,decimal1,ts from orc_split_elim where userid<=70 POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_split_elim #### A masked pattern was here #### -13 bar 80.0 2 1969-12-31 16:00:05 -2 foo 0.8 1 1969-12-31 16:00:00 -29 cat 8.0 3 1969-12-31 16:00:10 -5 eat 0.8 6 1969-12-31 16:00:20 -70 dog 1.8 4 1969-12-31 16:00:15 +13 bar 80.0 2 1969-12-31 16:00:05.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +29 cat 8.0 3 1969-12-31 16:00:10.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 +70 dog 1.8 4 1969-12-31 16:00:15.0 PREHOOK: query: -- partitioned table create table orc_split_elim_part (userid bigint, string1 string, subtype double, decimal1 decimal, ts timestamp) partitioned by (country string, year int) stored as orc PREHOOK: type: CREATETABLE @@ -318,8 +318,8 @@ POSTHOOK: Input: default@orc_split_elim_part POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2000 POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2001 #### A masked pattern was here #### -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 PREHOOK: query: -- 2 mapper - split elimination select userid,string1,subtype,decimal1,ts from orc_split_elim_part where userid<=2 and country='us' PREHOOK: type: QUERY @@ -334,8 +334,8 @@ POSTHOOK: Input: default@orc_split_elim_part POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2000 POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2001 #### A masked pattern was here #### -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 PREHOOK: query: -- 10 mapper - no split elimination select userid,string1,subtype,decimal1,ts from orc_split_elim_part where userid<=2 and country='us' and (year=2000 or year=2001) PREHOOK: type: QUERY @@ -350,8 +350,8 @@ POSTHOOK: Input: default@orc_split_elim_part POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2000 POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2001 #### A masked pattern was here #### -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 PREHOOK: query: -- 2 mapper - split elimination select userid,string1,subtype,decimal1,ts from orc_split_elim_part where userid<=2 and country='us' and (year=2000 or year=2001) PREHOOK: type: QUERY @@ -366,8 +366,8 @@ POSTHOOK: Input: default@orc_split_elim_part POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2000 POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2001 #### A masked pattern was here #### -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 PREHOOK: query: -- 10 mapper - no split elimination select userid,string1,subtype,decimal1,ts from orc_split_elim_part where userid<=2 and country='us' and year=2000 PREHOOK: type: QUERY @@ -380,7 +380,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_split_elim_part POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2000 #### A masked pattern was here #### -2 foo 0.8 1 1969-12-31 16:00:00 +2 foo 0.8 1 1969-12-31 16:00:00.0 PREHOOK: query: -- 1 mapper - split elimination select userid,string1,subtype,decimal1,ts from orc_split_elim_part where userid<=2 and country='us' and year=2000 PREHOOK: type: QUERY @@ -393,7 +393,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_split_elim_part POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2000 #### A masked pattern was here #### -2 foo 0.8 1 1969-12-31 16:00:00 +2 foo 0.8 1 1969-12-31 16:00:00.0 PREHOOK: query: -- 10 mapper - no split elimination select userid,string1,subtype,decimal1,ts from orc_split_elim_part where userid<=5 and country='us' PREHOOK: type: QUERY @@ -408,10 +408,10 @@ POSTHOOK: Input: default@orc_split_elim_part POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2000 POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2001 #### A masked pattern was here #### -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 -5 eat 0.8 6 1969-12-31 16:00:20 -5 eat 0.8 6 1969-12-31 16:00:20 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 PREHOOK: query: -- 4 mapper - split elimination select userid,string1,subtype,decimal1,ts from orc_split_elim_part where userid<=5 and country='us' PREHOOK: type: QUERY @@ -426,10 +426,10 @@ POSTHOOK: Input: default@orc_split_elim_part POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2000 POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2001 #### A masked pattern was here #### -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 -5 eat 0.8 6 1969-12-31 16:00:20 -5 eat 0.8 6 1969-12-31 16:00:20 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 PREHOOK: query: -- 10 mapper - no split elimination select userid,string1,subtype,decimal1,ts from orc_split_elim_part where userid<=5 and country='us' and (year=2000 or year=2001) PREHOOK: type: QUERY @@ -444,10 +444,10 @@ POSTHOOK: Input: default@orc_split_elim_part POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2000 POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2001 #### A masked pattern was here #### -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 -5 eat 0.8 6 1969-12-31 16:00:20 -5 eat 0.8 6 1969-12-31 16:00:20 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 PREHOOK: query: -- 4 mapper - split elimination select userid,string1,subtype,decimal1,ts from orc_split_elim_part where userid<=5 and country='us' and (year=2000 or year=2001) PREHOOK: type: QUERY @@ -462,10 +462,10 @@ POSTHOOK: Input: default@orc_split_elim_part POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2000 POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2001 #### A masked pattern was here #### -2 foo 0.8 1 1969-12-31 16:00:00 -2 foo 0.8 1 1969-12-31 16:00:00 -5 eat 0.8 6 1969-12-31 16:00:20 -5 eat 0.8 6 1969-12-31 16:00:20 +2 foo 0.8 1 1969-12-31 16:00:00.0 +2 foo 0.8 1 1969-12-31 16:00:00.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 PREHOOK: query: -- 10 mapper - no split elimination select userid,string1,subtype,decimal1,ts from orc_split_elim_part where userid<=5 and country='us' and year=2000 PREHOOK: type: QUERY @@ -478,8 +478,8 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_split_elim_part POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2000 #### A masked pattern was here #### -2 foo 0.8 1 1969-12-31 16:00:00 -5 eat 0.8 6 1969-12-31 16:00:20 +2 foo 0.8 1 1969-12-31 16:00:00.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 PREHOOK: query: -- 2 mapper - split elimination select userid,string1,subtype,decimal1,ts from orc_split_elim_part where userid<=5 and country='us' and year=2000 PREHOOK: type: QUERY @@ -492,8 +492,8 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@orc_split_elim_part POSTHOOK: Input: default@orc_split_elim_part@country=us/year=2000 #### A masked pattern was here #### -2 foo 0.8 1 1969-12-31 16:00:00 -5 eat 0.8 6 1969-12-31 16:00:20 +2 foo 0.8 1 1969-12-31 16:00:00.0 +5 eat 0.8 6 1969-12-31 16:00:20.0 PREHOOK: query: -- 0 mapper - no split elimination select userid,string1,subtype,decimal1,ts from orc_split_elim_part where userid<=70 and country='in' PREHOOK: type: QUERY diff --git ql/src/test/results/clientpositive/parquet_ppd_timestamp.q.out ql/src/test/results/clientpositive/parquet_ppd_timestamp.q.out index 979c7b8..4e6ca3a 100644 --- ql/src/test/results/clientpositive/parquet_ppd_timestamp.q.out +++ ql/src/test/results/clientpositive/parquet_ppd_timestamp.q.out @@ -18,32 +18,32 @@ POSTHOOK: Lineage: newtypestbl.c EXPRESSION [] POSTHOOK: Lineage: newtypestbl.d EXPRESSION [] POSTHOOK: Lineage: newtypestbl.ts EXPRESSION [] POSTHOOK: Lineage: newtypestbl.v EXPRESSION [] -PREHOOK: query: select * from newtypestbl where cast(ts as string)='2011-01-01 01:01:01' +PREHOOK: query: select * from newtypestbl where cast(ts as string)='2011-01-01 01:01:01.0' PREHOOK: type: QUERY PREHOOK: Input: default@newtypestbl #### A masked pattern was here #### -POSTHOOK: query: select * from newtypestbl where cast(ts as string)='2011-01-01 01:01:01' +POSTHOOK: query: select * from newtypestbl where cast(ts as string)='2011-01-01 01:01:01.0' POSTHOOK: type: QUERY POSTHOOK: Input: default@newtypestbl #### A masked pattern was here #### -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -PREHOOK: query: select * from newtypestbl where cast(ts as string)='2011-01-01 01:01:01' +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +PREHOOK: query: select * from newtypestbl where cast(ts as string)='2011-01-01 01:01:01.0' PREHOOK: type: QUERY PREHOOK: Input: default@newtypestbl #### A masked pattern was here #### -POSTHOOK: query: select * from newtypestbl where cast(ts as string)='2011-01-01 01:01:01' +POSTHOOK: query: select * from newtypestbl where cast(ts as string)='2011-01-01 01:01:01.0' POSTHOOK: type: QUERY POSTHOOK: Input: default@newtypestbl #### A masked pattern was here #### -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 PREHOOK: query: select * from newtypestbl where ts=cast('2011-01-01 01:01:01' as timestamp) PREHOOK: type: QUERY PREHOOK: Input: default@newtypestbl @@ -52,11 +52,11 @@ POSTHOOK: query: select * from newtypestbl where ts=cast('2011-01-01 01:01:01' a POSTHOOK: type: QUERY POSTHOOK: Input: default@newtypestbl #### A masked pattern was here #### -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 PREHOOK: query: select * from newtypestbl where ts=cast('2011-01-01 01:01:01' as timestamp) PREHOOK: type: QUERY PREHOOK: Input: default@newtypestbl @@ -65,11 +65,11 @@ POSTHOOK: query: select * from newtypestbl where ts=cast('2011-01-01 01:01:01' a POSTHOOK: type: QUERY POSTHOOK: Input: default@newtypestbl #### A masked pattern was here #### -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 PREHOOK: query: select * from newtypestbl where ts=cast('2011-01-01 01:01:01' as varchar(20)) PREHOOK: type: QUERY PREHOOK: Input: default@newtypestbl @@ -78,11 +78,11 @@ POSTHOOK: query: select * from newtypestbl where ts=cast('2011-01-01 01:01:01' a POSTHOOK: type: QUERY POSTHOOK: Input: default@newtypestbl #### A masked pattern was here #### -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 PREHOOK: query: select * from newtypestbl where ts=cast('2011-01-01 01:01:01' as varchar(20)) PREHOOK: type: QUERY PREHOOK: Input: default@newtypestbl @@ -91,11 +91,11 @@ POSTHOOK: query: select * from newtypestbl where ts=cast('2011-01-01 01:01:01' a POSTHOOK: type: QUERY POSTHOOK: Input: default@newtypestbl #### A masked pattern was here #### -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 -apple bee 0.220 2011-01-01 01:01:01 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 +apple bee 0.220 2011-01-01 01:01:01.0 PREHOOK: query: select * from newtypestbl where ts!=cast('2011-01-01 01:01:01' as timestamp) PREHOOK: type: QUERY PREHOOK: Input: default@newtypestbl @@ -104,11 +104,11 @@ POSTHOOK: query: select * from newtypestbl where ts!=cast('2011-01-01 01:01:01' POSTHOOK: type: QUERY POSTHOOK: Input: default@newtypestbl #### A masked pattern was here #### -hello world 11.220 2011-01-20 01:01:01 -hello world 11.220 2011-01-20 01:01:01 -hello world 11.220 2011-01-20 01:01:01 -hello world 11.220 2011-01-20 01:01:01 -hello world 11.220 2011-01-20 01:01:01 +hello world 11.220 2011-01-20 01:01:01.0 +hello world 11.220 2011-01-20 01:01:01.0 +hello world 11.220 2011-01-20 01:01:01.0 +hello world 11.220 2011-01-20 01:01:01.0 +hello world 11.220 2011-01-20 01:01:01.0 PREHOOK: query: select * from newtypestbl where ts!=cast('2011-01-01 01:01:01' as timestamp) PREHOOK: type: QUERY PREHOOK: Input: default@newtypestbl @@ -117,11 +117,11 @@ POSTHOOK: query: select * from newtypestbl where ts!=cast('2011-01-01 01:01:01' POSTHOOK: type: QUERY POSTHOOK: Input: default@newtypestbl #### A masked pattern was here #### -hello world 11.220 2011-01-20 01:01:01 -hello world 11.220 2011-01-20 01:01:01 -hello world 11.220 2011-01-20 01:01:01 -hello world 11.220 2011-01-20 01:01:01 -hello world 11.220 2011-01-20 01:01:01 +hello world 11.220 2011-01-20 01:01:01.0 +hello world 11.220 2011-01-20 01:01:01.0 +hello world 11.220 2011-01-20 01:01:01.0 +hello world 11.220 2011-01-20 01:01:01.0 +hello world 11.220 2011-01-20 01:01:01.0 PREHOOK: query: select * from newtypestbl where ts threadLocalDateFormat = - new ThreadLocal() { - @Override - protected DateFormat initialValue() { - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - } - }; - private Timestamp timestamp = new Timestamp(0); /** @@ -389,17 +379,7 @@ public String toString() { populateTimestamp(); } - String timestampString = timestamp.toString(); - if (timestampString.length() > 19) { - if (timestampString.length() == 21) { - if (timestampString.substring(19).compareTo(".0") == 0) { - return threadLocalDateFormat.get().format(timestamp); - } - } - return threadLocalDateFormat.get().format(timestamp) + timestampString.substring(19); - } - - return threadLocalDateFormat.get().format(timestamp); + return timestamp.toString(); } @Override