Author: hashutosh
Date: Sat Feb 16 05:39:09 2013
New Revision: 1446842
URL: http://svn.apache.org/r1446842
Log:
HIVE4028 : Bring paranthesis handling in windowing specification in compliance with sql standard
(Ashutosh Chauhan)
Modified:
hive/branches/ptfwindowing/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
hive/branches/ptfwindowing/ql/src/test/queries/clientpositive/ptf_general_queries.q
hive/branches/ptfwindowing/ql/src/test/results/clientpositive/ptf_general_queries.q.out
Modified: hive/branches/ptfwindowing/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
URL: http://svn.apache.org/viewvc/hive/branches/ptfwindowing/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g?rev=1446842&r1=1446841&r2=1446842&view=diff
==============================================================================
 hive/branches/ptfwindowing/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g (original)
+++ hive/branches/ptfwindowing/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g Sat Feb
16 05:39:09 2013
@@ 1726,7 +1726,7 @@ selectItem
:
( selectExpression
((KW_AS? Identifier)  (KW_AS LPAREN Identifier (COMMA Identifier)* RPAREN))?
 (KW_OVER LPAREN ws=window_specification RPAREN )?
+ (KW_OVER ws=window_specification )?
) > ^(TOK_SELEXPR selectExpression Identifier* $ws?)
;
@@ 1966,7 +1966,7 @@ window_specification
@init { msgs.push("window_specification"); }
@after { msgs.pop(); }
:
 Identifier? partitioningSpec? window_frame? > ^(TOK_WINDOWSPEC Identifier? partitioningSpec?
window_frame?)
+ (Identifier  ( LPAREN Identifier? partitioningSpec? window_frame? RPAREN)) > ^(TOK_WINDOWSPEC
Identifier? partitioningSpec? window_frame?)
;
window_frame :
Modified: hive/branches/ptfwindowing/ql/src/test/queries/clientpositive/ptf_general_queries.q
URL: http://svn.apache.org/viewvc/hive/branches/ptfwindowing/ql/src/test/queries/clientpositive/ptf_general_queries.q?rev=1446842&r1=1446841&r2=1446842&view=diff
==============================================================================
 hive/branches/ptfwindowing/ql/src/test/queries/clientpositive/ptf_general_queries.q (original)
+++ hive/branches/ptfwindowing/ql/src/test/queries/clientpositive/ptf_general_queries.q Sat
Feb 16 05:39:09 2013
@@ 266,48 +266,48 @@ having r < 4;
 26. testFirstLast
select p_mfgr,p_name, p_size,
sum(p_size) as s2 over (rows between current row and current row),
first_value(p_size) as f over (w1) ,
last_value(p_size, false) as l over (w1)
+first_value(p_size) as f over w1 ,
+last_value(p_size, false) as l over w1
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following;
+window w1 as (rows between 2 preceding and 2 following);
 27. testFirstLastWithWhere
select p_mfgr,p_name, p_size,
rank() as r,
sum(p_size) as s2 over (rows between current row and current row),
first_value(p_size) as f over (w1),
last_value(p_size, false) as l over (w1)
+first_value(p_size) as f over w1,
+last_value(p_size, false) as l over w1
from part
where p_mfgr = 'Manufacturer#3'
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following;
+window w1 as (rows between 2 preceding and 2 following);
 28. testSumDelta
select p_mfgr,p_name, p_size,
sum(p_size  lag(p_size,1)) as deltaSum over (w1)
+sum(p_size  lag(p_size,1)) as deltaSum over w1
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following ;
+window w1 as (rows between 2 preceding and 2 following) ;
 29. testSumWindow
select p_mfgr,p_name, p_size,
sum(p_size) as s1 over (w1),
+sum(p_size) as s1 over w1,
sum(p_size) as s2 over (rows between current row and current row)
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following;
+window w1 as (rows between 2 preceding and 2 following);
 30. testNoSortClause
select p_mfgr,p_name, p_size,
rank() as r, denserank() as dr
from part
distribute by p_mfgr
window w1 as rows between 2 preceding and 2 following;
+window w1 as (rows between 2 preceding and 2 following);
 31. testExpressions
select p_mfgr,p_name, p_size,
@@ 321,12 +321,12 @@ avg(p_size) as avg,
stddev(p_size) as st,
first_value(p_size % 5) as fv,
last_value(p_size) as lv,
first_value(p_size, true) as fvW1 over (w1)
+first_value(p_size, true) as fvW1 over w1
from part
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following;
+window w1 as (rows between 2 preceding and 2 following);
 32. testMultipleWindows
select p_mfgr,p_name, p_size,
@@ 334,12 +334,12 @@ select p_mfgr,p_name, p_size,
cumedist() as cud,
sum(p_size) as s1 over (rows between unbounded preceding and current row),
sum(p_size) as s2 over (range between p_size 5 less and current row),
first_value(p_size, true) as fv1 over (w1)
+first_value(p_size, true) as fv1 over w1
from part
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following;
+window w1 as (rows between 2 preceding and 2 following);
 33. testFunctionChain
select p_mfgr, p_name, p_size,
@@ 357,23 +357,23 @@ sub1.cd, sub1.s1
from (select p_mfgr, p_name,
count(p_size) as cd,
p_retailprice,
sum(p_retailprice) as s1 over (w1)
+sum(p_retailprice) as s1 over w1
from noop(part
distribute by p_mfgr
sort by p_name)
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
) sub1 ;
 35. testCountStar
select p_mfgr,p_name, p_size,
count(*) as c,
count(p_size) as ca,
first_value(p_size, true) as fvW1 over (w1)
+first_value(p_size, true) as fvW1 over w1
from part
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following;
+window w1 as (rows between 2 preceding and 2 following);
 36. testJoinWithWindowingWithCount
select abc.p_mfgr, abc.p_name,
@@ 395,53 +395,53 @@ sum(p_size  lag(p_size,1)) as deltaSum
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following ;
+window w1 as (rows between 2 preceding and 2 following) ;
 38. testUDAFs
select p_mfgr,p_name, p_size,
sum(p_retailprice) as s over (w1),
min(p_retailprice) as mi over (w1),
max(p_retailprice) as ma over (w1),
avg(p_retailprice) as ag over (w1)
+sum(p_retailprice) as s over w1,
+min(p_retailprice) as mi over w1,
+max(p_retailprice) as ma over w1,
+avg(p_retailprice) as ag over w1
from part
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following;
+window w1 as (rows between 2 preceding and 2 following);
 39. testUDAFsWithPTFWithGBY
select p_mfgr,p_name, p_size, p_retailprice,
sum(p_retailprice) as s over (w1),
+sum(p_retailprice) as s over w1,
min(p_retailprice) as mi ,
max(p_retailprice) as ma ,
avg(p_retailprice) as ag over (w1)
+avg(p_retailprice) as ag over w1
from part
group by p_mfgr,p_name, p_size, p_retailprice
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following;
+window w1 as (rows between 2 preceding and 2 following);
 40. testSTATs
select p_mfgr,p_name, p_size,
stddev(p_retailprice) as sdev over (w1),
stddev_pop(p_retailprice) as sdev_pop over (w1),
collect_set(p_size) as uniq_size over (w1),
variance(p_retailprice) as var over (w1),
corr(p_size, p_retailprice) as cor over (w1),
covar_pop(p_size, p_retailprice) as covarp over (w1)
+stddev(p_retailprice) as sdev over w1,
+stddev_pop(p_retailprice) as sdev_pop over w1,
+collect_set(p_size) as uniq_size over w1,
+variance(p_retailprice) as var over w1,
+corr(p_size, p_retailprice) as cor over w1,
+covar_pop(p_size, p_retailprice) as covarp over w1
from part
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following;
+window w1 as (rows between 2 preceding and 2 following);
 41. testDISTs
select p_mfgr,p_name, p_size,
histogram_numeric(p_retailprice, 5) as hist over (w1),
percentile(p_partkey, 0.5) as per over (w1),
+histogram_numeric(p_retailprice, 5) as hist over w1,
+percentile(p_partkey, 0.5) as per over w1,
rownumber() as rn
from part
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following;
+window w1 as (rows between 2 preceding and 2 following);
 42. testDistinctInSelectWithPTF
select DISTINCT p_mfgr, p_name, p_size
@@ 467,39 +467,39 @@ from part
group by p_mfgr, p_brand;
select p_mfgr, p_brand, s,
sum(s) as s1 over (w1)
+sum(s) as s1 over w1
from mfgr_price_view
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and current row;
+window w1 as (rows between 2 preceding and current row);
 45. testViewAsTableInputToPTF
select p_mfgr, p_brand, s,
sum(s) as s1 over (w1)
+sum(s) as s1 over w1
from noop(mfgr_price_view
distribute by p_mfgr
sort by p_mfgr)
window w1 as rows between 2 preceding and current row;
+window w1 as (rows between 2 preceding and current row);
 46. testCreateViewWithWindowingQuery
create view IF NOT EXISTS mfgr_brand_price_view as
select p_mfgr, p_brand,
sum(p_retailprice) as s over (w1)
+sum(p_retailprice) as s over w1
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and current row;
+window w1 as (rows between 2 preceding and current row);
select * from mfgr_brand_price_view;
 47. testLateralViews
select p_mfgr, p_name,
lv_col, p_size, sum(p_size) as s over (w1)
+lv_col, p_size, sum(p_size) as s over w1
from (select p_mfgr, p_name, p_size, array(1,2,3) arr from part) p
lateral view explode(arr) part_lv as lv_col
distribute by p_mfgr
sort by p_name
window w1 as rows between 2 preceding and current row;
+window w1 as (rows between 2 preceding and current row);
 48. testConstExprInSelect
select 'tst1' as key, count(1) as value from part;
@@ 546,20 +546,20 @@ rank() as r, denserank() as dr,
cumedist() as cud,
sum(p_size) as s1 over (rows between unbounded preceding and current row),
sum(p_size) as s2 over (range between p_size 5 less and current row),
first_value(p_size, true) as fv1 over (w1)
+first_value(p_size, true) as fv1 over w1
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
INSERT OVERWRITE TABLE part_3
select p_mfgr,p_name, p_size,
count(*) as c,
count(p_size) as ca,
first_value(p_size, true) as fv over (w1)
+first_value(p_size, true) as fv over w1
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following;
+window w1 as (rows between 2 preceding and 2 following);
select * from part_1;
@@ 585,7 +585,7 @@ sum(p_size) as s1 over (range between cu
from part
distribute by p_mfgr
sort by p_mfgr, p_size
window w1 as rows between 2 preceding and 2 following;
+window w1 as (rows between 2 preceding and 2 following);
 52. testMultipleInserts2SWQsWithPTF
CREATE TABLE part_4(
@@ 622,11 +622,11 @@ sum(p_size) as s2 over (range between p_
rank() as r,
denserank() as dr,
cumedist() as cud,
first_value(p_size, true) as fv1 over (w1)
+first_value(p_size, true) as fv1 over w1
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following;
+window w1 as (rows between 2 preceding and 2 following);
select * from part_4;
@@ 639,69 +639,69 @@ from part;
 54. testPartOrderInWdwDef
select p_mfgr, p_name, p_size,
sum(p_size) as s over (w1)
+sum(p_size) as s over w1
from part
window w1 as distribute by p_mfgr sort by p_name rows between 2 preceding and 2 following;
+window w1 as (distribute by p_mfgr sort by p_name rows between 2 preceding and 2 following);
 55. testDefaultPartitioningSpecRules
select p_mfgr, p_name, p_size,
sum(p_size) as s over (w1),
 sum(p_size) as s2 over(w2)
+sum(p_size) as s over w1,
+ sum(p_size) as s2 over w2
from part
sort by p_name
window w1 as distribute by p_mfgr rows between 2 preceding and 2 following,
 w2 as distribute by p_mfgr sort by p_name;
+window w1 as (distribute by p_mfgr rows between 2 preceding and 2 following),
+ w2 as (distribute by p_mfgr sort by p_name);
 56. testWindowCrossReference
select p_mfgr, p_name, p_size,
sum(p_size) as s1 over (w1),
sum(p_size) as s2 over (w2)
+sum(p_size) as s1 over w1,
+sum(p_size) as s2 over w2
from part
window w1 as distribute by p_mfgr sort by p_mfgr rows between 2 preceding and 2 following,
+window w1 as (distribute by p_mfgr sort by p_mfgr rows between 2 preceding and 2 following),
w2 as w1;
 57. testWindowInheritance
select p_mfgr, p_name, p_size,
sum(p_size) as s1 over (w1),
sum(p_size) as s2 over (w2)
+sum(p_size) as s1 over w1,
+sum(p_size) as s2 over w2
from part
window w1 as distribute by p_mfgr sort by p_mfgr rows between 2 preceding and 2 following,
 w2 as w1 rows between unbounded preceding and current row;
+window w1 as (distribute by p_mfgr sort by p_mfgr rows between 2 preceding and 2 following),
+ w2 as (w1 rows between unbounded preceding and current row);
 58. testWindowForwardReference
select p_mfgr, p_name, p_size,
sum(p_size) as s1 over (w1),
sum(p_size) as s2 over (w2),
sum(p_size) as s3 over (w3)
+sum(p_size) as s1 over w1,
+sum(p_size) as s2 over w2,
+sum(p_size) as s3 over w3
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following,
+window w1 as (rows between 2 preceding and 2 following),
w2 as w3,
 w3 as rows between unbounded preceding and current row;
+ w3 as (rows between unbounded preceding and current row);
 59. testWindowDefinitionPropagation
select p_mfgr, p_name, p_size,
sum(p_size) as s1 over (w1),
sum(p_size) as s2 over (w2),
+sum(p_size) as s1 over w1,
+sum(p_size) as s2 over w2,
sum(p_size) as s3 over (w3 rows between 2 preceding and 2 following)
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following,
+window w1 as (rows between 2 preceding and 2 following),
w2 as w3,
 w3 as rows between unbounded preceding and current row;
+ w3 as (rows between unbounded preceding and current row);
 60. testDistinctWithWindowing
select DISTINCT p_mfgr, p_name, p_size,
sum(p_size) as s over (w1)
+sum(p_size) as s over w1
from part
distribute by p_mfgr
sort by p_name
window w1 as rows between 2 preceding and 2 following;
+window w1 as (rows between 2 preceding and 2 following);
 61. testMulti2OperatorsFunctionChainWithMap
select p_mfgr, p_name,
Modified: hive/branches/ptfwindowing/ql/src/test/results/clientpositive/ptf_general_queries.q.out
URL: http://svn.apache.org/viewvc/hive/branches/ptfwindowing/ql/src/test/results/clientpositive/ptf_general_queries.q.out?rev=1446842&r1=1446841&r2=1446842&view=diff
==============================================================================
 hive/branches/ptfwindowing/ql/src/test/results/clientpositive/ptf_general_queries.q.out
(original)
+++ hive/branches/ptfwindowing/ql/src/test/results/clientpositive/ptf_general_queries.q.out
Sat Feb 16 05:39:09 2013
@@ 1267,24 +1267,24 @@ Manufacturer#5 almond antique sky peru o
PREHOOK: query:  26. testFirstLast
select p_mfgr,p_name, p_size,
sum(p_size) as s2 over (rows between current row and current row),
first_value(p_size) as f over (w1) ,
last_value(p_size, false) as l over (w1)
+first_value(p_size) as f over w1 ,
+last_value(p_size, false) as l over w1
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query:  26. testFirstLast
select p_mfgr,p_name, p_size,
sum(p_size) as s2 over (rows between current row and current row),
first_value(p_size) as f over (w1) ,
last_value(p_size, false) as l over (w1)
+first_value(p_size) as f over w1 ,
+last_value(p_size, false) as l over w1
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1318,13 +1318,13 @@ PREHOOK: query:  27. testFirstLastWith
select p_mfgr,p_name, p_size,
rank() as r,
sum(p_size) as s2 over (rows between current row and current row),
first_value(p_size) as f over (w1),
last_value(p_size, false) as l over (w1)
+first_value(p_size) as f over w1,
+last_value(p_size, false) as l over w1
from part
where p_mfgr = 'Manufacturer#3'
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1332,13 +1332,13 @@ POSTHOOK: query:  27. testFirstLastWit
select p_mfgr,p_name, p_size,
rank() as r,
sum(p_size) as s2 over (rows between current row and current row),
first_value(p_size) as f over (w1),
last_value(p_size, false) as l over (w1)
+first_value(p_size) as f over w1,
+last_value(p_size, false) as l over w1
from part
where p_mfgr = 'Manufacturer#3'
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1349,21 +1349,21 @@ Manufacturer#3 almond antique misty red
Manufacturer#3 almond antique olive coral navajo 45 1 45 19 45
PREHOOK: query:  28. testSumDelta
select p_mfgr,p_name, p_size,
sum(p_size  lag(p_size,1)) as deltaSum over (w1)
+sum(p_size  lag(p_size,1)) as deltaSum over w1
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query:  28. testSumDelta
select p_mfgr,p_name, p_size,
sum(p_size  lag(p_size,1)) as deltaSum over (w1)
+sum(p_size  lag(p_size,1)) as deltaSum over w1
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1395,23 +1395,23 @@ Manufacturer#5 almond aquamarine dodger
Manufacturer#5 almond azure blanched chiffon midnight 23 21
PREHOOK: query:  29. testSumWindow
select p_mfgr,p_name, p_size,
sum(p_size) as s1 over (w1),
+sum(p_size) as s1 over w1,
sum(p_size) as s2 over (rows between current row and current row)
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query:  29. testSumWindow
select p_mfgr,p_name, p_size,
sum(p_size) as s1 over (w1),
+sum(p_size) as s1 over w1,
sum(p_size) as s2 over (rows between current row and current row)
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1446,7 +1446,7 @@ select p_mfgr,p_name, p_size,
rank() as r, denserank() as dr
from part
distribute by p_mfgr
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1455,7 +1455,7 @@ select p_mfgr,p_name, p_size,
rank() as r, denserank() as dr
from part
distribute by p_mfgr
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1497,12 +1497,12 @@ avg(p_size) as avg,
stddev(p_size) as st,
first_value(p_size % 5) as fv,
last_value(p_size) as lv,
first_value(p_size, true) as fvW1 over (w1)
+first_value(p_size, true) as fvW1 over w1
from part
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1518,12 +1518,12 @@ avg(p_size) as avg,
stddev(p_size) as st,
first_value(p_size % 5) as fv,
last_value(p_size) as lv,
first_value(p_size, true) as fvW1 over (w1)
+first_value(p_size, true) as fvW1 over w1
from part
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1554,12 +1554,12 @@ select p_mfgr,p_name, p_size,
cumedist() as cud,
sum(p_size) as s1 over (rows between unbounded preceding and current row),
sum(p_size) as s2 over (range between p_size 5 less and current row),
first_value(p_size, true) as fv1 over (w1)
+first_value(p_size, true) as fv1 over w1
from part
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1569,12 +1569,12 @@ select p_mfgr,p_name, p_size,
cumedist() as cud,
sum(p_size) as s1 over (rows between unbounded preceding and current row),
sum(p_size) as s2 over (range between p_size 5 less and current row),
first_value(p_size, true) as fv1 over (w1)
+first_value(p_size, true) as fv1 over w1
from part
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1655,11 +1655,11 @@ sub1.cd, sub1.s1
from (select p_mfgr, p_name,
count(p_size) as cd,
p_retailprice,
sum(p_retailprice) as s1 over (w1)
+sum(p_retailprice) as s1 over w1
from noop(part
distribute by p_mfgr
sort by p_name)
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
) sub1
PREHOOK: type: QUERY
PREHOOK: Input: default@part
@@ 1670,11 +1670,11 @@ sub1.cd, sub1.s1
from (select p_mfgr, p_name,
count(p_size) as cd,
p_retailprice,
sum(p_retailprice) as s1 over (w1)
+sum(p_retailprice) as s1 over w1
from noop(part
distribute by p_mfgr
sort by p_name)
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
) sub1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
@@ 1709,12 +1709,12 @@ PREHOOK: query:  35. testCountStar
select p_mfgr,p_name, p_size,
count(*) as c,
count(p_size) as ca,
first_value(p_size, true) as fvW1 over (w1)
+first_value(p_size, true) as fvW1 over w1
from part
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1722,12 +1722,12 @@ POSTHOOK: query:  35. testCountStar
select p_mfgr,p_name, p_size,
count(*) as c,
count(p_size) as ca,
first_value(p_size, true) as fvW1 over (w1)
+first_value(p_size, true) as fvW1 over w1
from part
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1818,7 +1818,7 @@ sum(p_size  lag(p_size,1)) as deltaSum
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1828,7 +1828,7 @@ sum(p_size  lag(p_size,1)) as deltaSum
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1860,27 +1860,27 @@ Manufacturer#5 almond aquamarine dodger
Manufacturer#5 almond azure blanched chiffon midnight 23 8
PREHOOK: query:  38. testUDAFs
select p_mfgr,p_name, p_size,
sum(p_retailprice) as s over (w1),
min(p_retailprice) as mi over (w1),
max(p_retailprice) as ma over (w1),
avg(p_retailprice) as ag over (w1)
+sum(p_retailprice) as s over w1,
+min(p_retailprice) as mi over w1,
+max(p_retailprice) as ma over w1,
+avg(p_retailprice) as ag over w1
from part
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query:  38. testUDAFs
select p_mfgr,p_name, p_size,
sum(p_retailprice) as s over (w1),
min(p_retailprice) as mi over (w1),
max(p_retailprice) as ma over (w1),
avg(p_retailprice) as ag over (w1)
+sum(p_retailprice) as s over w1,
+min(p_retailprice) as mi over w1,
+max(p_retailprice) as ma over w1,
+avg(p_retailprice) as ag over w1
from part
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1912,29 +1912,29 @@ Manufacturer#5 almond aquamarine dodger
Manufacturer#5 almond azure blanched chiffon midnight 23 4271.3099999999995 1018.1 1788.73
1423.7699999999998
PREHOOK: query:  39. testUDAFsWithPTFWithGBY
select p_mfgr,p_name, p_size, p_retailprice,
sum(p_retailprice) as s over (w1),
+sum(p_retailprice) as s over w1,
min(p_retailprice) as mi ,
max(p_retailprice) as ma ,
avg(p_retailprice) as ag over (w1)
+avg(p_retailprice) as ag over w1
from part
group by p_mfgr,p_name, p_size, p_retailprice
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query:  39. testUDAFsWithPTFWithGBY
select p_mfgr,p_name, p_size, p_retailprice,
sum(p_retailprice) as s over (w1),
+sum(p_retailprice) as s over w1,
min(p_retailprice) as mi ,
max(p_retailprice) as ma ,
avg(p_retailprice) as ag over (w1)
+avg(p_retailprice) as ag over w1
from part
group by p_mfgr,p_name, p_size, p_retailprice
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 1965,31 +1965,31 @@ Manufacturer#5 almond aquamarine dodger
Manufacturer#5 almond azure blanched chiffon midnight 23 1464.48 4271.3099999999995 1464.48
1464.48 1423.7699999999998
PREHOOK: query:  40. testSTATs
select p_mfgr,p_name, p_size,
stddev(p_retailprice) as sdev over (w1),
stddev_pop(p_retailprice) as sdev_pop over (w1),
collect_set(p_size) as uniq_size over (w1),
variance(p_retailprice) as var over (w1),
corr(p_size, p_retailprice) as cor over (w1),
covar_pop(p_size, p_retailprice) as covarp over (w1)
+stddev(p_retailprice) as sdev over w1,
+stddev_pop(p_retailprice) as sdev_pop over w1,
+collect_set(p_size) as uniq_size over w1,
+variance(p_retailprice) as var over w1,
+corr(p_size, p_retailprice) as cor over w1,
+covar_pop(p_size, p_retailprice) as covarp over w1
from part
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query:  40. testSTATs
select p_mfgr,p_name, p_size,
stddev(p_retailprice) as sdev over (w1),
stddev_pop(p_retailprice) as sdev_pop over (w1),
collect_set(p_size) as uniq_size over (w1),
variance(p_retailprice) as var over (w1),
corr(p_size, p_retailprice) as cor over (w1),
covar_pop(p_size, p_retailprice) as covarp over (w1)
+stddev(p_retailprice) as sdev over w1,
+stddev_pop(p_retailprice) as sdev_pop over w1,
+collect_set(p_size) as uniq_size over w1,
+variance(p_retailprice) as var over w1,
+corr(p_size, p_retailprice) as cor over w1,
+covar_pop(p_size, p_retailprice) as covarp over w1
from part
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 2021,25 +2021,25 @@ Manufacturer#5 almond aquamarine dodger
Manufacturer#5 almond azure blanched chiffon midnight 23 315.9225931564038 315.9225931564038
[2,23,46] 99807.08486666664 0.9978877469246936 5664.856666666666
PREHOOK: query:  41. testDISTs
select p_mfgr,p_name, p_size,
histogram_numeric(p_retailprice, 5) as hist over (w1),
percentile(p_partkey, 0.5) as per over (w1),
+histogram_numeric(p_retailprice, 5) as hist over w1,
+percentile(p_partkey, 0.5) as per over w1,
rownumber() as rn
from part
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query:  41. testDISTs
select p_mfgr,p_name, p_size,
histogram_numeric(p_retailprice, 5) as hist over (w1),
percentile(p_partkey, 0.5) as per over (w1),
+histogram_numeric(p_retailprice, 5) as hist over w1,
+percentile(p_partkey, 0.5) as per over w1,
rownumber() as rn
from part
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 2178,21 +2178,21 @@ POSTHOOK: type: CREATEVIEW
POSTHOOK: Output: default@mfgr_price_view
#### A masked pattern was here ####
PREHOOK: query: select p_mfgr, p_brand, s,
sum(s) as s1 over (w1)
+sum(s) as s1 over w1
from mfgr_price_view
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and current row
+window w1 as (rows between 2 preceding and current row)
PREHOOK: type: QUERY
PREHOOK: Input: default@mfgr_price_view
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query: select p_mfgr, p_brand, s,
sum(s) as s1 over (w1)
+sum(s) as s1 over w1
from mfgr_price_view
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and current row
+window w1 as (rows between 2 preceding and current row)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@mfgr_price_view
POSTHOOK: Input: default@part
@@ 2215,22 +2215,22 @@ Manufacturer#5 Brand#52 3254.17 4865.83
Manufacturer#5 Brand#53 2806.83 7672.66
PREHOOK: query:  45. testViewAsTableInputToPTF
select p_mfgr, p_brand, s,
sum(s) as s1 over (w1)
+sum(s) as s1 over w1
from noop(mfgr_price_view
distribute by p_mfgr
sort by p_mfgr)
window w1 as rows between 2 preceding and current row
+window w1 as (rows between 2 preceding and current row)
PREHOOK: type: QUERY
PREHOOK: Input: default@mfgr_price_view
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query:  45. testViewAsTableInputToPTF
select p_mfgr, p_brand, s,
sum(s) as s1 over (w1)
+sum(s) as s1 over w1
from noop(mfgr_price_view
distribute by p_mfgr
sort by p_mfgr)
window w1 as rows between 2 preceding and current row
+window w1 as (rows between 2 preceding and current row)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@mfgr_price_view
POSTHOOK: Input: default@part
@@ 2254,21 +2254,21 @@ Manufacturer#5 Brand#53 2806.83 7672.66
PREHOOK: query:  46. testCreateViewWithWindowingQuery
create view IF NOT EXISTS mfgr_brand_price_view as
select p_mfgr, p_brand,
sum(p_retailprice) as s over (w1)
+sum(p_retailprice) as s over w1
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and current row
+window w1 as (rows between 2 preceding and current row)
PREHOOK: type: CREATEVIEW
#### A masked pattern was here ####
POSTHOOK: query:  46. testCreateViewWithWindowingQuery
create view IF NOT EXISTS mfgr_brand_price_view as
select p_mfgr, p_brand,
sum(p_retailprice) as s over (w1)
+sum(p_retailprice) as s over w1
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and current row
+window w1 as (rows between 2 preceding and current row)
POSTHOOK: type: CREATEVIEW
POSTHOOK: Output: default@mfgr_brand_price_view
#### A masked pattern was here ####
@@ 2310,23 +2310,23 @@ Manufacturer#5 Brand#53 4418.49000000000
Manufacturer#5 Brand#52 4271.3099999999995
PREHOOK: query:  47. testLateralViews
select p_mfgr, p_name,
lv_col, p_size, sum(p_size) as s over (w1)
+lv_col, p_size, sum(p_size) as s over w1
from (select p_mfgr, p_name, p_size, array(1,2,3) arr from part) p
lateral view explode(arr) part_lv as lv_col
distribute by p_mfgr
sort by p_name
window w1 as rows between 2 preceding and current row
+window w1 as (rows between 2 preceding and current row)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query:  47. testLateralViews
select p_mfgr, p_name,
lv_col, p_size, sum(p_size) as s over (w1)
+lv_col, p_size, sum(p_size) as s over w1
from (select p_mfgr, p_name, p_size, array(1,2,3) arr from part) p
lateral view explode(arr) part_lv as lv_col
distribute by p_mfgr
sort by p_name
window w1 as rows between 2 preceding and current row
+window w1 as (rows between 2 preceding and current row)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 2492,20 +2492,20 @@ rank() as r, denserank() as dr,
cumedist() as cud,
sum(p_size) as s1 over (rows between unbounded preceding and current row),
sum(p_size) as s2 over (range between p_size 5 less and current row),
first_value(p_size, true) as fv1 over (w1)
+first_value(p_size, true) as fv1 over w1
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
INSERT OVERWRITE TABLE part_3
select p_mfgr,p_name, p_size,
count(*) as c,
count(p_size) as ca,
first_value(p_size, true) as fv over (w1)
+first_value(p_size, true) as fv over w1
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
PREHOOK: Output: default@part_1
@@ 2525,20 +2525,20 @@ rank() as r, denserank() as dr,
cumedist() as cud,
sum(p_size) as s1 over (rows between unbounded preceding and current row),
sum(p_size) as s2 over (range between p_size 5 less and current row),
first_value(p_size, true) as fv1 over (w1)
+first_value(p_size, true) as fv1 over w1
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
INSERT OVERWRITE TABLE part_3
select p_mfgr,p_name, p_size,
count(*) as c,
count(p_size) as ca,
first_value(p_size, true) as fv over (w1)
+first_value(p_size, true) as fv over w1
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
POSTHOOK: Output: default@part_1
@@ 2799,7 +2799,7 @@ sum(p_size) as s1 over (range between cu
from part
distribute by p_mfgr
sort by p_mfgr, p_size
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
@@ 2810,7 +2810,7 @@ sum(p_size) as s1 over (range between cu
from part
distribute by p_mfgr
sort by p_mfgr, p_size
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 2960,11 +2960,11 @@ sum(p_size) as s2 over (range between p_
rank() as r,
denserank() as dr,
cumedist() as cud,
first_value(p_size, true) as fv1 over (w1)
+first_value(p_size, true) as fv1 over w1
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
PREHOOK: Output: default@part_4
@@ 2984,11 +2984,11 @@ sum(p_size) as s2 over (range between p_
rank() as r,
denserank() as dr,
cumedist() as cud,
first_value(p_size, true) as fv1 over (w1)
+first_value(p_size, true) as fv1 over w1
having p_size > 5
distribute by p_mfgr
sort by p_mfgr, p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
POSTHOOK: Output: default@part_4
@@ 3242,17 +3242,17 @@ Manufacturer#5 almond aquamarine dodger
Manufacturer#5 almond azure blanched chiffon midnight 23 71
PREHOOK: query:  54. testPartOrderInWdwDef
select p_mfgr, p_name, p_size,
sum(p_size) as s over (w1)
+sum(p_size) as s over w1
from part
window w1 as distribute by p_mfgr sort by p_name rows between 2 preceding and 2 following
+window w1 as (distribute by p_mfgr sort by p_name rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query:  54. testPartOrderInWdwDef
select p_mfgr, p_name, p_size,
sum(p_size) as s over (w1)
+sum(p_size) as s over w1
from part
window w1 as distribute by p_mfgr sort by p_name rows between 2 preceding and 2 following
+window w1 as (distribute by p_mfgr sort by p_name rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 3320,23 +3320,23 @@ Manufacturer#5 almond aquamarine dodger
Manufacturer#5 almond azure blanched chiffon midnight 23 71
PREHOOK: query:  55. testDefaultPartitioningSpecRules
select p_mfgr, p_name, p_size,
sum(p_size) as s over (w1),
 sum(p_size) as s2 over(w2)
+sum(p_size) as s over w1,
+ sum(p_size) as s2 over w2
from part
sort by p_name
window w1 as distribute by p_mfgr rows between 2 preceding and 2 following,
 w2 as distribute by p_mfgr sort by p_name
+window w1 as (distribute by p_mfgr rows between 2 preceding and 2 following),
+ w2 as (distribute by p_mfgr sort by p_name)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query:  55. testDefaultPartitioningSpecRules
select p_mfgr, p_name, p_size,
sum(p_size) as s over (w1),
 sum(p_size) as s2 over(w2)
+sum(p_size) as s over w1,
+ sum(p_size) as s2 over w2
from part
sort by p_name
window w1 as distribute by p_mfgr rows between 2 preceding and 2 following,
 w2 as distribute by p_mfgr sort by p_name
+window w1 as (distribute by p_mfgr rows between 2 preceding and 2 following),
+ w2 as (distribute by p_mfgr sort by p_name)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 3404,20 +3404,20 @@ Manufacturer#5 almond aquamarine dodger
Manufacturer#5 almond azure blanched chiffon midnight 23 71 108
PREHOOK: query:  56. testWindowCrossReference
select p_mfgr, p_name, p_size,
sum(p_size) as s1 over (w1),
sum(p_size) as s2 over (w2)
+sum(p_size) as s1 over w1,
+sum(p_size) as s2 over w2
from part
window w1 as distribute by p_mfgr sort by p_mfgr rows between 2 preceding and 2 following,
+window w1 as (distribute by p_mfgr sort by p_mfgr rows between 2 preceding and 2 following),
w2 as w1
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query:  56. testWindowCrossReference
select p_mfgr, p_name, p_size,
sum(p_size) as s1 over (w1),
sum(p_size) as s2 over (w2)
+sum(p_size) as s1 over w1,
+sum(p_size) as s2 over w2
from part
window w1 as distribute by p_mfgr sort by p_mfgr rows between 2 preceding and 2 following,
+window w1 as (distribute by p_mfgr sort by p_mfgr rows between 2 preceding and 2 following),
w2 as w1
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
@@ 3486,21 +3486,21 @@ Manufacturer#5 almond aquamarine dodger
Manufacturer#5 almond azure blanched chiffon midnight 23 71 71
PREHOOK: query:  57. testWindowInheritance
select p_mfgr, p_name, p_size,
sum(p_size) as s1 over (w1),
sum(p_size) as s2 over (w2)
+sum(p_size) as s1 over w1,
+sum(p_size) as s2 over w2
from part
window w1 as distribute by p_mfgr sort by p_mfgr rows between 2 preceding and 2 following,
 w2 as w1 rows between unbounded preceding and current row
+window w1 as (distribute by p_mfgr sort by p_mfgr rows between 2 preceding and 2 following),
+ w2 as (w1 rows between unbounded preceding and current row)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query:  57. testWindowInheritance
select p_mfgr, p_name, p_size,
sum(p_size) as s1 over (w1),
sum(p_size) as s2 over (w2)
+sum(p_size) as s1 over w1,
+sum(p_size) as s2 over w2
from part
window w1 as distribute by p_mfgr sort by p_mfgr rows between 2 preceding and 2 following,
 w2 as w1 rows between unbounded preceding and current row
+window w1 as (distribute by p_mfgr sort by p_mfgr rows between 2 preceding and 2 following),
+ w2 as (w1 rows between unbounded preceding and current row)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 3568,29 +3568,29 @@ Manufacturer#5 almond aquamarine dodger
Manufacturer#5 almond azure blanched chiffon midnight 23 71 108
PREHOOK: query:  58. testWindowForwardReference
select p_mfgr, p_name, p_size,
sum(p_size) as s1 over (w1),
sum(p_size) as s2 over (w2),
sum(p_size) as s3 over (w3)
+sum(p_size) as s1 over w1,
+sum(p_size) as s2 over w2,
+sum(p_size) as s3 over w3
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following,
+window w1 as (rows between 2 preceding and 2 following),
w2 as w3,
 w3 as rows between unbounded preceding and current row
+ w3 as (rows between unbounded preceding and current row)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query:  58. testWindowForwardReference
select p_mfgr, p_name, p_size,
sum(p_size) as s1 over (w1),
sum(p_size) as s2 over (w2),
sum(p_size) as s3 over (w3)
+sum(p_size) as s1 over w1,
+sum(p_size) as s2 over w2,
+sum(p_size) as s3 over w3
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following,
+window w1 as (rows between 2 preceding and 2 following),
w2 as w3,
 w3 as rows between unbounded preceding and current row
+ w3 as (rows between unbounded preceding and current row)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 3658,29 +3658,29 @@ Manufacturer#5 almond aquamarine dodger
Manufacturer#5 almond azure blanched chiffon midnight 23 71 108 108
PREHOOK: query:  59. testWindowDefinitionPropagation
select p_mfgr, p_name, p_size,
sum(p_size) as s1 over (w1),
sum(p_size) as s2 over (w2),
+sum(p_size) as s1 over w1,
+sum(p_size) as s2 over w2,
sum(p_size) as s3 over (w3 rows between 2 preceding and 2 following)
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following,
+window w1 as (rows between 2 preceding and 2 following),
w2 as w3,
 w3 as rows between unbounded preceding and current row
+ w3 as (rows between unbounded preceding and current row)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query:  59. testWindowDefinitionPropagation
select p_mfgr, p_name, p_size,
sum(p_size) as s1 over (w1),
sum(p_size) as s2 over (w2),
+sum(p_size) as s1 over w1,
+sum(p_size) as s2 over w2,
sum(p_size) as s3 over (w3 rows between 2 preceding and 2 following)
from part
distribute by p_mfgr
sort by p_mfgr
window w1 as rows between 2 preceding and 2 following,
+window w1 as (rows between 2 preceding and 2 following),
w2 as w3,
 w3 as rows between unbounded preceding and current row
+ w3 as (rows between unbounded preceding and current row)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
@@ 3748,21 +3748,21 @@ Manufacturer#5 almond aquamarine dodger
Manufacturer#5 almond azure blanched chiffon midnight 23 71 108 71
PREHOOK: query:  60. testDistinctWithWindowing
select DISTINCT p_mfgr, p_name, p_size,
sum(p_size) as s over (w1)
+sum(p_size) as s over w1
from part
distribute by p_mfgr
sort by p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
PREHOOK: type: QUERY
PREHOOK: Input: default@part
#### A masked pattern was here ####
POSTHOOK: query:  60. testDistinctWithWindowing
select DISTINCT p_mfgr, p_name, p_size,
sum(p_size) as s over (w1)
+sum(p_size) as s over w1
from part
distribute by p_mfgr
sort by p_name
window w1 as rows between 2 preceding and 2 following
+window w1 as (rows between 2 preceding and 2 following)
POSTHOOK: type: QUERY
POSTHOOK: Input: default@part
#### A masked pattern was here ####
