diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/WindowingSpec.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/WindowingSpec.java index ef5186a..1cf65cf 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/WindowingSpec.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/WindowingSpec.java @@ -203,9 +203,9 @@ private void applyConstantPartition(WindowSpec wdwSpec) { BETWEEN AND CURRENT ROW * - A Window Specification with an Order Specification and no Window * Frame is interpreted as: - ROW BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW + ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW * - A Window Specification with no Order and no Window Frame is interpreted as: - ROW BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING + ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING */ private void effectiveWindowFrame(WindowFunctionSpec wFn, WindowSpec wdwSpec) throws SemanticException { @@ -216,7 +216,6 @@ private void effectiveWindowFrame(WindowFunctionSpec wFn, WindowSpec wdwSpec) OrderSpec orderSpec = wdwSpec.getOrder(); if ( wFrame == null ) { if (!supportsWindowing ) { - if ( wFn.getName().toLowerCase().equals(FunctionRegistry.LAST_VALUE_FUNC_NAME) && orderSpec != null ) { /* @@ -227,26 +226,26 @@ private void effectiveWindowFrame(WindowFunctionSpec wFn, WindowSpec wdwSpec) new CurrentRowSpec(), new RangeBoundarySpec(Direction.FOLLOWING, 0) ); + } else { + wFrame = new WindowFrameSpec( + new RangeBoundarySpec(Direction.PRECEDING, BoundarySpec.UNBOUNDED_AMOUNT), + new RangeBoundarySpec(Direction.FOLLOWING, BoundarySpec.UNBOUNDED_AMOUNT) + ); } - else { + } else { + if ( orderSpec == null ) { wFrame = new WindowFrameSpec( new RangeBoundarySpec(Direction.PRECEDING, BoundarySpec.UNBOUNDED_AMOUNT), new RangeBoundarySpec(Direction.FOLLOWING, BoundarySpec.UNBOUNDED_AMOUNT) ); + } else { + wFrame = new WindowFrameSpec( + new RangeBoundarySpec(Direction.PRECEDING, BoundarySpec.UNBOUNDED_AMOUNT), + new CurrentRowSpec() + ); } } - else if ( orderSpec == null ) { - wFrame = new WindowFrameSpec( - new RangeBoundarySpec(Direction.PRECEDING, BoundarySpec.UNBOUNDED_AMOUNT), - new RangeBoundarySpec(Direction.FOLLOWING, BoundarySpec.UNBOUNDED_AMOUNT) - ); - } - else { - wFrame = new WindowFrameSpec( - new ValueBoundarySpec(Direction.PRECEDING, BoundarySpec.UNBOUNDED_AMOUNT), - new CurrentRowSpec() - ); - } + wdwSpec.setWindowFrame(wFrame); } else if ( wFrame.getEnd() == null ) { diff --git a/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/WindowingTableFunction.java b/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/WindowingTableFunction.java index 5cc84a0..93740fa 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/WindowingTableFunction.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/WindowingTableFunction.java @@ -54,7 +54,6 @@ import org.apache.hadoop.hive.ql.plan.ptf.WindowTableFunctionDef; import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator; import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffer; -import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFStreamingEvaluator.SumAvgEnhancer; import org.apache.hadoop.hive.ql.udf.generic.ISupportStreamingModeForWindowing; import org.apache.hadoop.hive.serde2.AbstractSerDe; import org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector; @@ -297,7 +296,6 @@ private void initializeWindowingFunctionInfoHelpers() throws SemanticException { WindowTableFunctionDef tabDef = (WindowTableFunctionDef) getTableDef(); for (int i = 0; i < tabDef.getWindowFunctions().size(); i++) { WindowFunctionDef wFn = tabDef.getWindowFunctions().get(i); - GenericUDAFEvaluator fnEval = wFn.getWFnEval(); WindowFunctionInfo wFnInfo = FunctionRegistry.getWindowFunctionInfo(wFn.getName()); boolean supportsWindow = wFnInfo.isSupportsWindow(); windowingFunctionHelpers.put(wFn.getName(), new WindowingFunctionInfoHelper(supportsWindow)); diff --git a/ql/src/test/results/clientpositive/cbo_rp_windowing.q.out b/ql/src/test/results/clientpositive/cbo_rp_windowing.q.out index 52b584a..04d6aa3 100644 --- a/ql/src/test/results/clientpositive/cbo_rp_windowing.q.out +++ b/ql/src/test/results/clientpositive/cbo_rp_windowing.q.out @@ -46,24 +46,24 @@ POSTHOOK: Input: default@cbo_t1@dt=2014 #### A masked pattern was here #### 0 NULL NULL NULL 1 1 1 0.0 NULL NULL 0 NULL NULL NULL 2 1 1 0.0 NULL NULL -16 16.0 1 1 10 5 3 0.24 1 1.0 -16 16.0 1 1 11 5 3 0.24 1 1.0 -16 16.0 1 1 12 5 3 0.24 1 1.0 -16 16.0 1 1 13 5 3 0.24 1 1.0 -16 16.0 1 1 14 5 3 0.24 1 1.0 -16 16.0 1 1 15 5 3 0.24 1 1.0 +1 1.0 1 1 1 1 1 0.0 1 1.0 +10 10.0 1 1 10 5 3 0.24 1 1.0 +11 11.0 1 1 11 5 3 0.24 1 1.0 +12 12.0 1 1 12 5 3 0.24 1 1.0 +13 13.0 1 1 13 5 3 0.24 1 1.0 +14 14.0 1 1 14 5 3 0.24 1 1.0 +15 15.0 1 1 15 5 3 0.24 1 1.0 16 16.0 1 1 16 5 3 0.24 1 1.0 -16 16.0 1 1 5 5 3 0.24 1 1.0 -16 16.0 1 1 6 5 3 0.24 1 1.0 -16 16.0 1 1 7 5 3 0.24 1 1.0 -16 16.0 1 1 8 5 3 0.24 1 1.0 -16 16.0 1 1 9 5 3 0.24 1 1.0 -18 18.0 1 1 17 17 4 0.94 1 1.0 +17 17.0 1 1 17 17 4 0.94 1 1.0 18 18.0 1 1 18 17 4 0.94 1 1.0 -2 2.0 1 1 1 1 1 0.0 1 1.0 2 2.0 1 1 2 1 1 0.0 1 1.0 -4 4.0 1 1 3 3 2 0.12 1 1.0 +3 3.0 1 1 3 3 2 0.12 1 1.0 4 4.0 1 1 4 3 2 0.12 1 1.0 +5 5.0 1 1 5 5 3 0.24 1 1.0 +6 6.0 1 1 6 5 3 0.24 1 1.0 +7 7.0 1 1 7 5 3 0.24 1 1.0 +8 8.0 1 1 8 5 3 0.24 1 1.0 +9 9.0 1 1 9 5 3 0.24 1 1.0 PREHOOK: query: select * from (select count(c_int) over(partition by c_float order by key), sum(c_float) over(partition by c_float order by key), max(c_int) over(partition by c_float order by key), min(c_int) over(partition by c_float order by key), row_number() over(partition by c_float order by key) as rn, rank() over(partition by c_float order by key), dense_rank() over(partition by c_float order by key), round(percent_rank() over(partition by c_float order by key),2), lead(c_int, 2, c_int) over(partition by c_float order by key ), lag(c_float, 2, c_float) over(partition by c_float order by key) from cbo_t1 order by rn) cbo_t1 PREHOOK: type: QUERY PREHOOK: Input: default@cbo_t1 @@ -76,24 +76,24 @@ POSTHOOK: Input: default@cbo_t1@dt=2014 #### A masked pattern was here #### 0 NULL NULL NULL 1 1 1 0.0 NULL NULL 0 NULL NULL NULL 2 1 1 0.0 NULL NULL -16 16.0 1 1 10 5 3 0.24 1 1.0 -16 16.0 1 1 11 5 3 0.24 1 1.0 -16 16.0 1 1 12 5 3 0.24 1 1.0 -16 16.0 1 1 13 5 3 0.24 1 1.0 -16 16.0 1 1 14 5 3 0.24 1 1.0 -16 16.0 1 1 15 5 3 0.24 1 1.0 +1 1.0 1 1 1 1 1 0.0 1 1.0 +10 10.0 1 1 10 5 3 0.24 1 1.0 +11 11.0 1 1 11 5 3 0.24 1 1.0 +12 12.0 1 1 12 5 3 0.24 1 1.0 +13 13.0 1 1 13 5 3 0.24 1 1.0 +14 14.0 1 1 14 5 3 0.24 1 1.0 +15 15.0 1 1 15 5 3 0.24 1 1.0 16 16.0 1 1 16 5 3 0.24 1 1.0 -16 16.0 1 1 5 5 3 0.24 1 1.0 -16 16.0 1 1 6 5 3 0.24 1 1.0 -16 16.0 1 1 7 5 3 0.24 1 1.0 -16 16.0 1 1 8 5 3 0.24 1 1.0 -16 16.0 1 1 9 5 3 0.24 1 1.0 -18 18.0 1 1 17 17 4 0.94 1 1.0 +17 17.0 1 1 17 17 4 0.94 1 1.0 18 18.0 1 1 18 17 4 0.94 1 1.0 -2 2.0 1 1 1 1 1 0.0 1 1.0 2 2.0 1 1 2 1 1 0.0 1 1.0 -4 4.0 1 1 3 3 2 0.12 1 1.0 +3 3.0 1 1 3 3 2 0.12 1 1.0 4 4.0 1 1 4 3 2 0.12 1 1.0 +5 5.0 1 1 5 5 3 0.24 1 1.0 +6 6.0 1 1 6 5 3 0.24 1 1.0 +7 7.0 1 1 7 5 3 0.24 1 1.0 +8 8.0 1 1 8 5 3 0.24 1 1.0 +9 9.0 1 1 9 5 3 0.24 1 1.0 PREHOOK: query: select x from (select count(c_int) over() as x, sum(c_float) over() from cbo_t1) cbo_t1 PREHOOK: type: QUERY PREHOOK: Input: default@cbo_t1 diff --git a/ql/src/test/results/clientpositive/cbo_windowing.q.out b/ql/src/test/results/clientpositive/cbo_windowing.q.out index 52b584a..04d6aa3 100644 --- a/ql/src/test/results/clientpositive/cbo_windowing.q.out +++ b/ql/src/test/results/clientpositive/cbo_windowing.q.out @@ -46,24 +46,24 @@ POSTHOOK: Input: default@cbo_t1@dt=2014 #### A masked pattern was here #### 0 NULL NULL NULL 1 1 1 0.0 NULL NULL 0 NULL NULL NULL 2 1 1 0.0 NULL NULL -16 16.0 1 1 10 5 3 0.24 1 1.0 -16 16.0 1 1 11 5 3 0.24 1 1.0 -16 16.0 1 1 12 5 3 0.24 1 1.0 -16 16.0 1 1 13 5 3 0.24 1 1.0 -16 16.0 1 1 14 5 3 0.24 1 1.0 -16 16.0 1 1 15 5 3 0.24 1 1.0 +1 1.0 1 1 1 1 1 0.0 1 1.0 +10 10.0 1 1 10 5 3 0.24 1 1.0 +11 11.0 1 1 11 5 3 0.24 1 1.0 +12 12.0 1 1 12 5 3 0.24 1 1.0 +13 13.0 1 1 13 5 3 0.24 1 1.0 +14 14.0 1 1 14 5 3 0.24 1 1.0 +15 15.0 1 1 15 5 3 0.24 1 1.0 16 16.0 1 1 16 5 3 0.24 1 1.0 -16 16.0 1 1 5 5 3 0.24 1 1.0 -16 16.0 1 1 6 5 3 0.24 1 1.0 -16 16.0 1 1 7 5 3 0.24 1 1.0 -16 16.0 1 1 8 5 3 0.24 1 1.0 -16 16.0 1 1 9 5 3 0.24 1 1.0 -18 18.0 1 1 17 17 4 0.94 1 1.0 +17 17.0 1 1 17 17 4 0.94 1 1.0 18 18.0 1 1 18 17 4 0.94 1 1.0 -2 2.0 1 1 1 1 1 0.0 1 1.0 2 2.0 1 1 2 1 1 0.0 1 1.0 -4 4.0 1 1 3 3 2 0.12 1 1.0 +3 3.0 1 1 3 3 2 0.12 1 1.0 4 4.0 1 1 4 3 2 0.12 1 1.0 +5 5.0 1 1 5 5 3 0.24 1 1.0 +6 6.0 1 1 6 5 3 0.24 1 1.0 +7 7.0 1 1 7 5 3 0.24 1 1.0 +8 8.0 1 1 8 5 3 0.24 1 1.0 +9 9.0 1 1 9 5 3 0.24 1 1.0 PREHOOK: query: select * from (select count(c_int) over(partition by c_float order by key), sum(c_float) over(partition by c_float order by key), max(c_int) over(partition by c_float order by key), min(c_int) over(partition by c_float order by key), row_number() over(partition by c_float order by key) as rn, rank() over(partition by c_float order by key), dense_rank() over(partition by c_float order by key), round(percent_rank() over(partition by c_float order by key),2), lead(c_int, 2, c_int) over(partition by c_float order by key ), lag(c_float, 2, c_float) over(partition by c_float order by key) from cbo_t1 order by rn) cbo_t1 PREHOOK: type: QUERY PREHOOK: Input: default@cbo_t1 @@ -76,24 +76,24 @@ POSTHOOK: Input: default@cbo_t1@dt=2014 #### A masked pattern was here #### 0 NULL NULL NULL 1 1 1 0.0 NULL NULL 0 NULL NULL NULL 2 1 1 0.0 NULL NULL -16 16.0 1 1 10 5 3 0.24 1 1.0 -16 16.0 1 1 11 5 3 0.24 1 1.0 -16 16.0 1 1 12 5 3 0.24 1 1.0 -16 16.0 1 1 13 5 3 0.24 1 1.0 -16 16.0 1 1 14 5 3 0.24 1 1.0 -16 16.0 1 1 15 5 3 0.24 1 1.0 +1 1.0 1 1 1 1 1 0.0 1 1.0 +10 10.0 1 1 10 5 3 0.24 1 1.0 +11 11.0 1 1 11 5 3 0.24 1 1.0 +12 12.0 1 1 12 5 3 0.24 1 1.0 +13 13.0 1 1 13 5 3 0.24 1 1.0 +14 14.0 1 1 14 5 3 0.24 1 1.0 +15 15.0 1 1 15 5 3 0.24 1 1.0 16 16.0 1 1 16 5 3 0.24 1 1.0 -16 16.0 1 1 5 5 3 0.24 1 1.0 -16 16.0 1 1 6 5 3 0.24 1 1.0 -16 16.0 1 1 7 5 3 0.24 1 1.0 -16 16.0 1 1 8 5 3 0.24 1 1.0 -16 16.0 1 1 9 5 3 0.24 1 1.0 -18 18.0 1 1 17 17 4 0.94 1 1.0 +17 17.0 1 1 17 17 4 0.94 1 1.0 18 18.0 1 1 18 17 4 0.94 1 1.0 -2 2.0 1 1 1 1 1 0.0 1 1.0 2 2.0 1 1 2 1 1 0.0 1 1.0 -4 4.0 1 1 3 3 2 0.12 1 1.0 +3 3.0 1 1 3 3 2 0.12 1 1.0 4 4.0 1 1 4 3 2 0.12 1 1.0 +5 5.0 1 1 5 5 3 0.24 1 1.0 +6 6.0 1 1 6 5 3 0.24 1 1.0 +7 7.0 1 1 7 5 3 0.24 1 1.0 +8 8.0 1 1 8 5 3 0.24 1 1.0 +9 9.0 1 1 9 5 3 0.24 1 1.0 PREHOOK: query: select x from (select count(c_int) over() as x, sum(c_float) over() from cbo_t1) cbo_t1 PREHOOK: type: QUERY PREHOOK: Input: default@cbo_t1 diff --git a/ql/src/test/results/clientpositive/leadlag.q.out b/ql/src/test/results/clientpositive/leadlag.q.out index 86718ae..a39ea33 100644 --- a/ql/src/test/results/clientpositive/leadlag.q.out +++ b/ql/src/test/results/clientpositive/leadlag.q.out @@ -154,7 +154,7 @@ window w1 as (rows between 2 preceding and 2 following) POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 0 +Manufacturer#1 almond antique burnished rose metallic 2 NULL Manufacturer#1 almond antique burnished rose metallic 2 0 Manufacturer#1 almond antique chartreuse lavender yellow 34 32 Manufacturer#1 almond antique salmon chartreuse burlywood 6 4 diff --git a/ql/src/test/results/clientpositive/llap/cbo_rp_windowing_2.q.out b/ql/src/test/results/clientpositive/llap/cbo_rp_windowing_2.q.out index 3434336..2659d0e 100644 --- a/ql/src/test/results/clientpositive/llap/cbo_rp_windowing_2.q.out +++ b/ql/src/test/results/clientpositive/llap/cbo_rp_windowing_2.q.out @@ -154,7 +154,7 @@ from part POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 +Manufacturer#1 almond antique burnished rose metallic 1 Manufacturer#1 almond antique burnished rose metallic 2 Manufacturer#1 almond antique chartreuse lavender yellow 3 Manufacturer#1 almond antique salmon chartreuse burlywood 4 @@ -202,7 +202,7 @@ from part POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 1 1 2 1173.15 1173.15 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 1 1173.15 1173.15 2 0 Manufacturer#1 almond antique burnished rose metallic 1 1 2 1173.15 2346.3 2 0 Manufacturer#1 almond antique chartreuse lavender yellow 3 2 3 1753.76 4100.06 34 32 Manufacturer#1 almond antique salmon chartreuse burlywood 4 3 4 1602.59 5702.650000000001 6 -28 @@ -254,11 +254,11 @@ from part POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### +1 1 1 1173.15 0 1 1 1 1620.67 0 1 1 1 1671.68 0 1 1 1 1690.68 0 1 1 1 1789.69 0 -1 1 2 1173.15 0 1 1 2 2346.3 0 2 2 2 2861.95 -3 2 2 2 2996.09 29 @@ -659,7 +659,7 @@ window w1 as (distribute by p_mfgr sort by p_mfgr, p_name rows between 2 precedi POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 1 1 0 0.0 1 2 2.0 0.0 2 2 2 +Manufacturer#1 almond antique burnished rose metallic 2 1 1 0 0.0 1 1 2.0 0.0 2 2 2 Manufacturer#1 almond antique burnished rose metallic 2 1 1 0 0.0 1 2 2.0 0.0 2 2 2 Manufacturer#1 almond antique chartreuse lavender yellow 34 3 2 0 0.4 2 3 12.666666666666666 15.084944665313014 2 34 2 Manufacturer#1 almond antique salmon chartreuse burlywood 6 4 3 0 0.6 2 4 11.0 13.379088160259652 2 6 2 @@ -757,7 +757,7 @@ window w1 as (distribute by p_mfgr sort by p_mfgr, p_name rows between 2 precedi POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 2 2 2 +Manufacturer#1 almond antique burnished rose metallic 2 1 1 2 Manufacturer#1 almond antique burnished rose metallic 2 2 2 2 Manufacturer#1 almond antique chartreuse lavender yellow 34 3 3 2 Manufacturer#1 almond antique salmon chartreuse burlywood 6 4 4 2 @@ -1022,21 +1022,21 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@mfgr_price_view POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 Brand#12 4800.84 8749.73 -Manufacturer#1 Brand#14 2346.3 8749.73 +Manufacturer#1 Brand#12 4800.84 4800.84 +Manufacturer#1 Brand#14 2346.3 7147.14 Manufacturer#1 Brand#15 1602.59 8749.73 -Manufacturer#2 Brand#22 3491.38 8923.62 -Manufacturer#2 Brand#23 2031.98 8923.62 -Manufacturer#2 Brand#24 1698.66 8923.62 +Manufacturer#2 Brand#22 3491.38 3491.38 +Manufacturer#2 Brand#23 2031.98 5523.36 +Manufacturer#2 Brand#24 1698.66 7222.02 Manufacturer#2 Brand#25 1701.6 8923.62 -Manufacturer#3 Brand#31 1671.68 7532.61 -Manufacturer#3 Brand#32 3333.37 7532.61 -Manufacturer#3 Brand#34 1337.29 7532.61 +Manufacturer#3 Brand#31 1671.68 1671.68 +Manufacturer#3 Brand#32 3333.37 5005.05 +Manufacturer#3 Brand#34 1337.29 6342.34 Manufacturer#3 Brand#35 1190.27 7532.61 -Manufacturer#4 Brand#41 4755.94 7337.62 +Manufacturer#4 Brand#41 4755.94 4755.94 Manufacturer#4 Brand#42 2581.68 7337.62 -Manufacturer#5 Brand#51 1611.66 7672.66 -Manufacturer#5 Brand#52 3254.17 7672.66 +Manufacturer#5 Brand#51 1611.66 1611.66 +Manufacturer#5 Brand#52 3254.17 4865.83 Manufacturer#5 Brand#53 2806.83 7672.66 PREHOOK: query: select p_mfgr, p_brand, s, round(sum(s) over w1 ,2) as s1 @@ -1434,7 +1434,7 @@ POSTHOOK: query: select * from part_3 POSTHOOK: type: QUERY POSTHOOK: Input: default@part_3 #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 2 2 2 +Manufacturer#1 almond antique burnished rose metallic 2 1 1 2 Manufacturer#1 almond antique burnished rose metallic 2 2 2 2 Manufacturer#1 almond antique chartreuse lavender yellow 34 3 3 2 Manufacturer#1 almond antique salmon chartreuse burlywood 6 4 4 2 @@ -1653,7 +1653,7 @@ window w1 as (distribute by p_mfgr sort by p_name rows between 2 preceding and 2 POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 38 4 +Manufacturer#1 almond antique burnished rose metallic 2 38 2 Manufacturer#1 almond antique burnished rose metallic 2 44 4 Manufacturer#1 almond antique chartreuse lavender yellow 34 72 38 Manufacturer#1 almond antique salmon chartreuse burlywood 6 112 44 @@ -1975,31 +1975,31 @@ from part POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### +Manufacturer#1 1173.15 1173.15 1173.15 1458.29 6 +Manufacturer#1 2346.3 1173.15 1173.15 1458.29 6 +Manufacturer#1 4100.06 1173.15 1753.76 1458.29 6 +Manufacturer#1 5702.65 1173.15 1753.76 1458.29 6 +Manufacturer#1 7117.07 1173.15 1753.76 1458.29 6 Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#2 8923.62 1690.68 2031.98 1784.72 5 -Manufacturer#2 8923.62 1690.68 2031.98 1784.72 5 -Manufacturer#2 8923.62 1690.68 2031.98 1784.72 5 +Manufacturer#2 1690.68 1690.68 1690.68 1784.72 5 +Manufacturer#2 3392.28 1690.68 1701.6 1784.72 5 +Manufacturer#2 5090.94 1690.68 1701.6 1784.72 5 +Manufacturer#2 7122.92 1690.68 2031.98 1784.72 5 Manufacturer#2 8923.62 1690.68 2031.98 1784.72 5 -Manufacturer#2 8923.62 1690.68 2031.98 1784.72 5 -Manufacturer#3 7532.61 1190.27 1922.98 1506.52 5 -Manufacturer#3 7532.61 1190.27 1922.98 1506.52 5 -Manufacturer#3 7532.61 1190.27 1922.98 1506.52 5 +Manufacturer#3 1337.29 1190.27 1337.29 1506.52 5 +Manufacturer#3 3008.97 1190.27 1671.68 1506.52 5 +Manufacturer#3 4199.24 1190.27 1671.68 1506.52 5 +Manufacturer#3 5609.63 1190.27 1671.68 1506.52 5 Manufacturer#3 7532.61 1190.27 1922.98 1506.52 5 -Manufacturer#3 7532.61 1190.27 1922.98 1506.52 5 -Manufacturer#4 7337.62 1206.26 1844.92 1467.52 5 -Manufacturer#4 7337.62 1206.26 1844.92 1467.52 5 -Manufacturer#4 7337.62 1206.26 1844.92 1467.52 5 -Manufacturer#4 7337.62 1206.26 1844.92 1467.52 5 +Manufacturer#4 1620.67 1206.26 1620.67 1467.52 5 +Manufacturer#4 2911.02 1206.26 1620.67 1467.52 5 +Manufacturer#4 4755.94 1206.26 1844.92 1467.52 5 +Manufacturer#4 5962.2 1206.26 1844.92 1467.52 5 Manufacturer#4 7337.62 1206.26 1844.92 1467.52 5 -Manufacturer#5 7672.66 1018.1 1789.69 1534.53 5 -Manufacturer#5 7672.66 1018.1 1789.69 1534.53 5 -Manufacturer#5 7672.66 1018.1 1789.69 1534.53 5 -Manufacturer#5 7672.66 1018.1 1789.69 1534.53 5 +Manufacturer#5 1789.69 1018.1 1789.69 1534.53 5 +Manufacturer#5 3401.35 1018.1 1789.69 1534.53 5 +Manufacturer#5 5190.08 1018.1 1789.69 1534.53 5 +Manufacturer#5 6208.18 1018.1 1789.69 1534.53 5 Manufacturer#5 7672.66 1018.1 1789.69 1534.53 5 PREHOOK: query: -- 38. testPartitioningVariousForms2 select p_mfgr, p_name, p_size, diff --git a/ql/src/test/results/clientpositive/llap/cbo_windowing.q.out b/ql/src/test/results/clientpositive/llap/cbo_windowing.q.out index 52b584a..04d6aa3 100644 --- a/ql/src/test/results/clientpositive/llap/cbo_windowing.q.out +++ b/ql/src/test/results/clientpositive/llap/cbo_windowing.q.out @@ -46,24 +46,24 @@ POSTHOOK: Input: default@cbo_t1@dt=2014 #### A masked pattern was here #### 0 NULL NULL NULL 1 1 1 0.0 NULL NULL 0 NULL NULL NULL 2 1 1 0.0 NULL NULL -16 16.0 1 1 10 5 3 0.24 1 1.0 -16 16.0 1 1 11 5 3 0.24 1 1.0 -16 16.0 1 1 12 5 3 0.24 1 1.0 -16 16.0 1 1 13 5 3 0.24 1 1.0 -16 16.0 1 1 14 5 3 0.24 1 1.0 -16 16.0 1 1 15 5 3 0.24 1 1.0 +1 1.0 1 1 1 1 1 0.0 1 1.0 +10 10.0 1 1 10 5 3 0.24 1 1.0 +11 11.0 1 1 11 5 3 0.24 1 1.0 +12 12.0 1 1 12 5 3 0.24 1 1.0 +13 13.0 1 1 13 5 3 0.24 1 1.0 +14 14.0 1 1 14 5 3 0.24 1 1.0 +15 15.0 1 1 15 5 3 0.24 1 1.0 16 16.0 1 1 16 5 3 0.24 1 1.0 -16 16.0 1 1 5 5 3 0.24 1 1.0 -16 16.0 1 1 6 5 3 0.24 1 1.0 -16 16.0 1 1 7 5 3 0.24 1 1.0 -16 16.0 1 1 8 5 3 0.24 1 1.0 -16 16.0 1 1 9 5 3 0.24 1 1.0 -18 18.0 1 1 17 17 4 0.94 1 1.0 +17 17.0 1 1 17 17 4 0.94 1 1.0 18 18.0 1 1 18 17 4 0.94 1 1.0 -2 2.0 1 1 1 1 1 0.0 1 1.0 2 2.0 1 1 2 1 1 0.0 1 1.0 -4 4.0 1 1 3 3 2 0.12 1 1.0 +3 3.0 1 1 3 3 2 0.12 1 1.0 4 4.0 1 1 4 3 2 0.12 1 1.0 +5 5.0 1 1 5 5 3 0.24 1 1.0 +6 6.0 1 1 6 5 3 0.24 1 1.0 +7 7.0 1 1 7 5 3 0.24 1 1.0 +8 8.0 1 1 8 5 3 0.24 1 1.0 +9 9.0 1 1 9 5 3 0.24 1 1.0 PREHOOK: query: select * from (select count(c_int) over(partition by c_float order by key), sum(c_float) over(partition by c_float order by key), max(c_int) over(partition by c_float order by key), min(c_int) over(partition by c_float order by key), row_number() over(partition by c_float order by key) as rn, rank() over(partition by c_float order by key), dense_rank() over(partition by c_float order by key), round(percent_rank() over(partition by c_float order by key),2), lead(c_int, 2, c_int) over(partition by c_float order by key ), lag(c_float, 2, c_float) over(partition by c_float order by key) from cbo_t1 order by rn) cbo_t1 PREHOOK: type: QUERY PREHOOK: Input: default@cbo_t1 @@ -76,24 +76,24 @@ POSTHOOK: Input: default@cbo_t1@dt=2014 #### A masked pattern was here #### 0 NULL NULL NULL 1 1 1 0.0 NULL NULL 0 NULL NULL NULL 2 1 1 0.0 NULL NULL -16 16.0 1 1 10 5 3 0.24 1 1.0 -16 16.0 1 1 11 5 3 0.24 1 1.0 -16 16.0 1 1 12 5 3 0.24 1 1.0 -16 16.0 1 1 13 5 3 0.24 1 1.0 -16 16.0 1 1 14 5 3 0.24 1 1.0 -16 16.0 1 1 15 5 3 0.24 1 1.0 +1 1.0 1 1 1 1 1 0.0 1 1.0 +10 10.0 1 1 10 5 3 0.24 1 1.0 +11 11.0 1 1 11 5 3 0.24 1 1.0 +12 12.0 1 1 12 5 3 0.24 1 1.0 +13 13.0 1 1 13 5 3 0.24 1 1.0 +14 14.0 1 1 14 5 3 0.24 1 1.0 +15 15.0 1 1 15 5 3 0.24 1 1.0 16 16.0 1 1 16 5 3 0.24 1 1.0 -16 16.0 1 1 5 5 3 0.24 1 1.0 -16 16.0 1 1 6 5 3 0.24 1 1.0 -16 16.0 1 1 7 5 3 0.24 1 1.0 -16 16.0 1 1 8 5 3 0.24 1 1.0 -16 16.0 1 1 9 5 3 0.24 1 1.0 -18 18.0 1 1 17 17 4 0.94 1 1.0 +17 17.0 1 1 17 17 4 0.94 1 1.0 18 18.0 1 1 18 17 4 0.94 1 1.0 -2 2.0 1 1 1 1 1 0.0 1 1.0 2 2.0 1 1 2 1 1 0.0 1 1.0 -4 4.0 1 1 3 3 2 0.12 1 1.0 +3 3.0 1 1 3 3 2 0.12 1 1.0 4 4.0 1 1 4 3 2 0.12 1 1.0 +5 5.0 1 1 5 5 3 0.24 1 1.0 +6 6.0 1 1 6 5 3 0.24 1 1.0 +7 7.0 1 1 7 5 3 0.24 1 1.0 +8 8.0 1 1 8 5 3 0.24 1 1.0 +9 9.0 1 1 9 5 3 0.24 1 1.0 PREHOOK: query: select x from (select count(c_int) over() as x, sum(c_float) over() from cbo_t1) cbo_t1 PREHOOK: type: QUERY PREHOOK: Input: default@cbo_t1 diff --git a/ql/src/test/results/clientpositive/llap/lineage2.q.out b/ql/src/test/results/clientpositive/llap/lineage2.q.out index b6cdc04..7c0d6e9 100644 --- a/ql/src/test/results/clientpositive/llap/lineage2.q.out +++ b/ql/src/test/results/clientpositive/llap/lineage2.q.out @@ -632,7 +632,7 @@ having count(a.c2) > 0 PREHOOK: type: QUERY PREHOOK: Input: default@dest_l2 #### A masked pattern was here #### -{"version":"1.0","engine":"tez","database":"default","hash":"0ae7aa4a0cbd1283210fa79e8a19104a","queryText":"select sum(a.c1) over (partition by a.c1 order by a.id)\nfrom dest_l2 a\nwhere a.c2 != 10\ngroup by a.c1, a.c2, a.id\nhaving count(a.c2) > 0","edges":[{"sources":[1,2,3],"targets":[0],"expression":"(tok_function sum (. (tok_table_or_col $hdt$_0) c1) (tok_windowspec (tok_partitioningspec (tok_distributeby (. (tok_table_or_col $hdt$_0) c1)) (tok_orderby (tok_tabsortcolnameasc (tok_nulls_first (. (tok_table_or_col $hdt$_0) id))))) (tok_windowvalues (preceding 2147483647) current)))","edgeType":"PROJECTION"},{"sources":[2],"targets":[0],"expression":"(a.c2 <> 10)","edgeType":"PREDICATE"},{"sources":[2],"targets":[0],"expression":"(count(default.dest_l2.c2) > 0)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"c0"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest_l2.c1"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"}]} +{"version":"1.0","engine":"tez","database":"default","hash":"0ae7aa4a0cbd1283210fa79e8a19104a","queryText":"select sum(a.c1) over (partition by a.c1 order by a.id)\nfrom dest_l2 a\nwhere a.c2 != 10\ngroup by a.c1, a.c2, a.id\nhaving count(a.c2) > 0","edges":[{"sources":[1,2,3],"targets":[0],"expression":"(tok_function sum (. (tok_table_or_col $hdt$_0) c1) (tok_windowspec (tok_partitioningspec (tok_distributeby (. (tok_table_or_col $hdt$_0) c1)) (tok_orderby (tok_tabsortcolnameasc (tok_nulls_first (. (tok_table_or_col $hdt$_0) id))))) (tok_windowrange (preceding 2147483647) current)))","edgeType":"PROJECTION"},{"sources":[2],"targets":[0],"expression":"(a.c2 <> 10)","edgeType":"PREDICATE"},{"sources":[2],"targets":[0],"expression":"(count(default.dest_l2.c2) > 0)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"c0"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest_l2.c1"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"}]} 1 PREHOOK: query: select sum(a.c1), count(b.c1), b.c2, b.c3 from dest_l2 a join dest_l3 b on (a.id = b.id) diff --git a/ql/src/test/results/clientpositive/llap/lineage3.q.out b/ql/src/test/results/clientpositive/llap/lineage3.q.out index 72a9344..db61013 100644 --- a/ql/src/test/results/clientpositive/llap/lineage3.q.out +++ b/ql/src/test/results/clientpositive/llap/lineage3.q.out @@ -317,9 +317,9 @@ PREHOOK: type: QUERY PREHOOK: Input: default@alltypesorc PREHOOK: Input: default@dest_v3 #### A masked pattern was here #### -{"version":"1.0","engine":"tez","database":"default","hash":"40bccc0722002f798d0548b59e369e83","queryText":"select * from dest_v3 limit 2","edges":[{"sources":[3,4,5,6,7],"targets":[0],"expression":"(tok_function sum (. (tok_table_or_col $hdt$_0) ctinyint) (tok_windowspec (tok_partitioningspec (tok_distributeby (. (tok_table_or_col $hdt$_0) csmallint)) (tok_orderby (tok_tabsortcolnameasc (tok_nulls_first (. (tok_table_or_col $hdt$_0) csmallint))))) (tok_windowvalues (preceding 2147483647) current)))","edgeType":"PROJECTION"},{"sources":[6],"targets":[1],"expression":"count(default.alltypesorc.cstring1)","edgeType":"PROJECTION"},{"sources":[5],"targets":[2],"edgeType":"PROJECTION"},{"sources":[8,7],"targets":[0,1,2],"expression":"(a.cboolean2 and a.cint is not null)","edgeType":"PREDICATE"},{"sources":[7],"targets":[0,1,2],"expression":"(a.cint = b.cint)","edgeType":"PREDICATE"},{"sources":[9,7],"targets":[0,1,2],"expression":"((b.cfloat > 0) and b.cint is not null)","edgeType":"PREDICATE"},{"sources":[7],"targets":[0,1,2],"expression":"(count(default.alltypesorc.cint) > 10)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"dest_v3.a"},{"id":1,"vertexType":"COLUMN","vertexId":"dest_v3.x"},{"id":2,"vertexType":"COLUMN","vertexId":"dest_v3.cboolean1"},{"id":3,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.csmallint"},{"id":5,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cboolean1"},{"id":6,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cstring1"},{"id":7,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"},{"id":8,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cboolean2"},{"id":9,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cfloat"}]} -38 216 false -38 229 true +{"version":"1.0","engine":"tez","database":"default","hash":"40bccc0722002f798d0548b59e369e83","queryText":"select * from dest_v3 limit 2","edges":[{"sources":[3,4,5,6,7],"targets":[0],"expression":"(tok_function sum (. (tok_table_or_col $hdt$_0) ctinyint) (tok_windowspec (tok_partitioningspec (tok_distributeby (. (tok_table_or_col $hdt$_0) csmallint)) (tok_orderby (tok_tabsortcolnameasc (tok_nulls_first (. (tok_table_or_col $hdt$_0) csmallint))))) (tok_windowrange (preceding 2147483647) current)))","edgeType":"PROJECTION"},{"sources":[6],"targets":[1],"expression":"count(default.alltypesorc.cstring1)","edgeType":"PROJECTION"},{"sources":[5],"targets":[2],"edgeType":"PROJECTION"},{"sources":[8,7],"targets":[0,1,2],"expression":"(a.cboolean2 and a.cint is not null)","edgeType":"PREDICATE"},{"sources":[7],"targets":[0,1,2],"expression":"(a.cint = b.cint)","edgeType":"PREDICATE"},{"sources":[9,7],"targets":[0,1,2],"expression":"((b.cfloat > 0) and b.cint is not null)","edgeType":"PREDICATE"},{"sources":[7],"targets":[0,1,2],"expression":"(count(default.alltypesorc.cint) > 10)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"dest_v3.a"},{"id":1,"vertexType":"COLUMN","vertexId":"dest_v3.x"},{"id":2,"vertexType":"COLUMN","vertexId":"dest_v3.cboolean1"},{"id":3,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.csmallint"},{"id":5,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cboolean1"},{"id":6,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cstring1"},{"id":7,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"},{"id":8,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cboolean2"},{"id":9,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cfloat"}]} +8 233 false +16 238 true PREHOOK: query: drop table if exists src_dp PREHOOK: type: DROPTABLE PREHOOK: query: create table src_dp (first string, word string, year int, month int, day int) diff --git a/ql/src/test/results/clientpositive/llap/ptf.q.out b/ql/src/test/results/clientpositive/llap/ptf.q.out index aabe694..1cff706 100644 --- a/ql/src/test/results/clientpositive/llap/ptf.q.out +++ b/ql/src/test/results/clientpositive/llap/ptf.q.out @@ -2319,7 +2319,7 @@ window w1 as (partition by p_mfgr order by p_name rows between 2 preceding and 2 POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 4100.06 +Manufacturer#1 almond antique burnished rose metallic 1 4100.06 Manufacturer#1 almond antique burnished rose metallic 2 5702.650000000001 Manufacturer#1 almond antique chartreuse lavender yellow 3 7117.070000000001 Manufacturer#1 almond antique salmon chartreuse burlywood 4 7576.58 @@ -2558,9 +2558,9 @@ order by p_name POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 1173.15 2 0 -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 2346.3 2 0 -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 3519.4500000000003 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 1 1173.15 1173.15 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 2 1173.15 2346.3 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 3 1173.15 3519.4500000000003 2 0 Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 4692.6 2 0 Manufacturer#1 almond antique chartreuse lavender yellow 5 2 5 1753.76 6446.360000000001 34 32 Manufacturer#1 almond antique salmon chartreuse burlywood 6 3 6 1602.59 8048.950000000001 6 -28 @@ -4112,7 +4112,7 @@ from noop(on POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 1 1 2 4 +Manufacturer#1 almond antique burnished rose metallic 1 1 2 2 Manufacturer#1 almond antique burnished rose metallic 1 1 2 4 Manufacturer#1 almond antique chartreuse lavender yellow 3 2 34 38 Manufacturer#1 almond antique salmon chartreuse burlywood 4 3 6 44 diff --git a/ql/src/test/results/clientpositive/llap/ptf_streaming.q.out b/ql/src/test/results/clientpositive/llap/ptf_streaming.q.out index 440b95d..6bec714 100644 --- a/ql/src/test/results/clientpositive/llap/ptf_streaming.q.out +++ b/ql/src/test/results/clientpositive/llap/ptf_streaming.q.out @@ -1838,9 +1838,9 @@ order by p_name POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 1173.15 2 0 -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 2346.3 2 0 -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 3519.4500000000003 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 1 1173.15 1173.15 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 2 1173.15 2346.3 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 3 1173.15 3519.4500000000003 2 0 Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 4692.6 2 0 Manufacturer#1 almond antique chartreuse lavender yellow 5 2 5 1753.76 6446.360000000001 34 32 Manufacturer#1 almond antique salmon chartreuse burlywood 6 3 6 1602.59 8048.950000000001 6 -28 diff --git a/ql/src/test/results/clientpositive/llap/special_character_in_tabnames_1.q.out b/ql/src/test/results/clientpositive/llap/special_character_in_tabnames_1.q.out index d5cedc4..8edad64 100644 --- a/ql/src/test/results/clientpositive/llap/special_character_in_tabnames_1.q.out +++ b/ql/src/test/results/clientpositive/llap/special_character_in_tabnames_1.q.out @@ -19267,24 +19267,24 @@ POSTHOOK: Input: default@c/b/o_t1@dt=2014 #### A masked pattern was here #### 0 NULL NULL NULL 1 1 1 0.0 NULL NULL 0 NULL NULL NULL 2 1 1 0.0 NULL NULL -16 16.0 1 1 10 5 3 0.24 1 1.0 -16 16.0 1 1 11 5 3 0.24 1 1.0 -16 16.0 1 1 12 5 3 0.24 1 1.0 -16 16.0 1 1 13 5 3 0.24 1 1.0 -16 16.0 1 1 14 5 3 0.24 1 1.0 -16 16.0 1 1 15 5 3 0.24 1 1.0 +1 1.0 1 1 1 1 1 0.0 1 1.0 +10 10.0 1 1 10 5 3 0.24 1 1.0 +11 11.0 1 1 11 5 3 0.24 1 1.0 +12 12.0 1 1 12 5 3 0.24 1 1.0 +13 13.0 1 1 13 5 3 0.24 1 1.0 +14 14.0 1 1 14 5 3 0.24 1 1.0 +15 15.0 1 1 15 5 3 0.24 1 1.0 16 16.0 1 1 16 5 3 0.24 1 1.0 -16 16.0 1 1 5 5 3 0.24 1 1.0 -16 16.0 1 1 6 5 3 0.24 1 1.0 -16 16.0 1 1 7 5 3 0.24 1 1.0 -16 16.0 1 1 8 5 3 0.24 1 1.0 -16 16.0 1 1 9 5 3 0.24 1 1.0 -18 18.0 1 1 17 17 4 0.94 1 1.0 +17 17.0 1 1 17 17 4 0.94 1 1.0 18 18.0 1 1 18 17 4 0.94 1 1.0 -2 2.0 1 1 1 1 1 0.0 1 1.0 2 2.0 1 1 2 1 1 0.0 1 1.0 -4 4.0 1 1 3 3 2 0.12 1 1.0 +3 3.0 1 1 3 3 2 0.12 1 1.0 4 4.0 1 1 4 3 2 0.12 1 1.0 +5 5.0 1 1 5 5 3 0.24 1 1.0 +6 6.0 1 1 6 5 3 0.24 1 1.0 +7 7.0 1 1 7 5 3 0.24 1 1.0 +8 8.0 1 1 8 5 3 0.24 1 1.0 +9 9.0 1 1 9 5 3 0.24 1 1.0 PREHOOK: query: select * from (select count(c_int) over(partition by c_float order by key), sum(c_float) over(partition by c_float order by key), max(c_int) over(partition by c_float order by key), min(c_int) over(partition by c_float order by key), row_number() over(partition by c_float order by key) as rn, rank() over(partition by c_float order by key), dense_rank() over(partition by c_float order by key), round(percent_rank() over(partition by c_float order by key),2), lead(c_int, 2, c_int) over(partition by c_float order by key ), lag(c_float, 2, c_float) over(partition by c_float order by key) from `c/b/o_t1` order by rn) `c/b/o_t1` PREHOOK: type: QUERY PREHOOK: Input: default@c/b/o_t1 @@ -19297,24 +19297,24 @@ POSTHOOK: Input: default@c/b/o_t1@dt=2014 #### A masked pattern was here #### 0 NULL NULL NULL 1 1 1 0.0 NULL NULL 0 NULL NULL NULL 2 1 1 0.0 NULL NULL -16 16.0 1 1 10 5 3 0.24 1 1.0 -16 16.0 1 1 11 5 3 0.24 1 1.0 -16 16.0 1 1 12 5 3 0.24 1 1.0 -16 16.0 1 1 13 5 3 0.24 1 1.0 -16 16.0 1 1 14 5 3 0.24 1 1.0 -16 16.0 1 1 15 5 3 0.24 1 1.0 +1 1.0 1 1 1 1 1 0.0 1 1.0 +10 10.0 1 1 10 5 3 0.24 1 1.0 +11 11.0 1 1 11 5 3 0.24 1 1.0 +12 12.0 1 1 12 5 3 0.24 1 1.0 +13 13.0 1 1 13 5 3 0.24 1 1.0 +14 14.0 1 1 14 5 3 0.24 1 1.0 +15 15.0 1 1 15 5 3 0.24 1 1.0 16 16.0 1 1 16 5 3 0.24 1 1.0 -16 16.0 1 1 5 5 3 0.24 1 1.0 -16 16.0 1 1 6 5 3 0.24 1 1.0 -16 16.0 1 1 7 5 3 0.24 1 1.0 -16 16.0 1 1 8 5 3 0.24 1 1.0 -16 16.0 1 1 9 5 3 0.24 1 1.0 -18 18.0 1 1 17 17 4 0.94 1 1.0 +17 17.0 1 1 17 17 4 0.94 1 1.0 18 18.0 1 1 18 17 4 0.94 1 1.0 -2 2.0 1 1 1 1 1 0.0 1 1.0 2 2.0 1 1 2 1 1 0.0 1 1.0 -4 4.0 1 1 3 3 2 0.12 1 1.0 +3 3.0 1 1 3 3 2 0.12 1 1.0 4 4.0 1 1 4 3 2 0.12 1 1.0 +5 5.0 1 1 5 5 3 0.24 1 1.0 +6 6.0 1 1 6 5 3 0.24 1 1.0 +7 7.0 1 1 7 5 3 0.24 1 1.0 +8 8.0 1 1 8 5 3 0.24 1 1.0 +9 9.0 1 1 9 5 3 0.24 1 1.0 PREHOOK: query: select x from (select count(c_int) over() as x, sum(c_float) over() from `c/b/o_t1`) `c/b/o_t1` PREHOOK: type: QUERY PREHOOK: Input: default@c/b/o_t1 diff --git a/ql/src/test/results/clientpositive/llap/vectorized_ptf.q.out b/ql/src/test/results/clientpositive/llap/vectorized_ptf.q.out index 996b893..01b3db2 100644 --- a/ql/src/test/results/clientpositive/llap/vectorized_ptf.q.out +++ b/ql/src/test/results/clientpositive/llap/vectorized_ptf.q.out @@ -3582,7 +3582,7 @@ window w1 as (partition by p_mfgr order by p_name rows between 2 preceding and 2 POSTHOOK: type: QUERY POSTHOOK: Input: default@part_orc #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 4100.06 +Manufacturer#1 almond antique burnished rose metallic 1 4100.06 Manufacturer#1 almond antique burnished rose metallic 2 5702.650000000001 Manufacturer#1 almond antique chartreuse lavender yellow 3 7117.070000000001 Manufacturer#1 almond antique salmon chartreuse burlywood 4 7576.58 @@ -3956,9 +3956,9 @@ order by p_name POSTHOOK: type: QUERY POSTHOOK: Input: default@part_orc #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 1173.15 2 0 -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 2346.3 2 0 -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 3519.4500000000003 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 1 1173.15 1173.15 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 2 1173.15 2346.3 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 3 1173.15 3519.4500000000003 2 0 Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 4692.6 2 0 Manufacturer#1 almond antique chartreuse lavender yellow 5 2 5 1753.76 6446.360000000001 34 32 Manufacturer#1 almond antique salmon chartreuse burlywood 6 3 6 1602.59 8048.950000000001 6 -28 @@ -6047,7 +6047,7 @@ from noop(on POSTHOOK: type: QUERY POSTHOOK: Input: default@part_orc #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 1 1 2 4 +Manufacturer#1 almond antique burnished rose metallic 1 1 2 2 Manufacturer#1 almond antique burnished rose metallic 1 1 2 4 Manufacturer#1 almond antique chartreuse lavender yellow 3 2 34 38 Manufacturer#1 almond antique salmon chartreuse burlywood 4 3 6 44 diff --git a/ql/src/test/results/clientpositive/llap/windowing.q.out b/ql/src/test/results/clientpositive/llap/windowing.q.out index 190d13b..b2e590b 100644 --- a/ql/src/test/results/clientpositive/llap/windowing.q.out +++ b/ql/src/test/results/clientpositive/llap/windowing.q.out @@ -154,7 +154,7 @@ from part POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 +Manufacturer#1 almond antique burnished rose metallic 1 Manufacturer#1 almond antique burnished rose metallic 2 Manufacturer#1 almond antique chartreuse lavender yellow 3 Manufacturer#1 almond antique salmon chartreuse burlywood 4 @@ -202,7 +202,7 @@ from part POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 1 1 2 1173.15 1173.15 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 1 1173.15 1173.15 2 0 Manufacturer#1 almond antique burnished rose metallic 1 1 2 1173.15 2346.3 2 0 Manufacturer#1 almond antique chartreuse lavender yellow 3 2 3 1753.76 4100.06 34 32 Manufacturer#1 almond antique salmon chartreuse burlywood 4 3 4 1602.59 5702.650000000001 6 -28 @@ -254,11 +254,11 @@ from part POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### +1 1 1 1173.15 0 1 1 1 1620.67 0 1 1 1 1671.68 0 1 1 1 1690.68 0 1 1 1 1789.69 0 -1 1 2 1173.15 0 1 1 2 2346.3 0 2 2 2 2861.95 -3 2 2 2 2996.09 29 @@ -659,7 +659,7 @@ window w1 as (distribute by p_mfgr sort by p_mfgr, p_name rows between 2 precedi POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 1 1 0.3333333333333333 0.0 1 2 2.0 0.0 2 2 2 +Manufacturer#1 almond antique burnished rose metallic 2 1 1 0.3333333333333333 0.0 1 1 2.0 0.0 2 2 2 Manufacturer#1 almond antique burnished rose metallic 2 1 1 0.3333333333333333 0.0 1 2 2.0 0.0 2 2 2 Manufacturer#1 almond antique chartreuse lavender yellow 34 3 2 0.5 0.4 2 3 12.666666666666666 15.084944665313014 2 34 2 Manufacturer#1 almond antique salmon chartreuse burlywood 6 4 3 0.6666666666666666 0.6 2 4 11.0 13.379088160259652 2 6 2 @@ -757,7 +757,7 @@ window w1 as (distribute by p_mfgr sort by p_mfgr, p_name rows between 2 precedi POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 2 2 2 +Manufacturer#1 almond antique burnished rose metallic 2 1 1 2 Manufacturer#1 almond antique burnished rose metallic 2 2 2 2 Manufacturer#1 almond antique chartreuse lavender yellow 34 3 3 2 Manufacturer#1 almond antique salmon chartreuse burlywood 6 4 4 2 @@ -1022,21 +1022,21 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@mfgr_price_view POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 Brand#12 4800.84 8749.73 -Manufacturer#1 Brand#14 2346.3 8749.73 +Manufacturer#1 Brand#12 4800.84 4800.84 +Manufacturer#1 Brand#14 2346.3 7147.14 Manufacturer#1 Brand#15 1602.59 8749.73 -Manufacturer#2 Brand#22 3491.38 8923.62 -Manufacturer#2 Brand#23 2031.98 8923.62 -Manufacturer#2 Brand#24 1698.66 8923.62 +Manufacturer#2 Brand#22 3491.38 3491.38 +Manufacturer#2 Brand#23 2031.98 5523.36 +Manufacturer#2 Brand#24 1698.66 7222.02 Manufacturer#2 Brand#25 1701.6 8923.62 -Manufacturer#3 Brand#31 1671.68 7532.61 -Manufacturer#3 Brand#32 3333.37 7532.61 -Manufacturer#3 Brand#34 1337.29 7532.61 +Manufacturer#3 Brand#31 1671.68 1671.68 +Manufacturer#3 Brand#32 3333.37 5005.05 +Manufacturer#3 Brand#34 1337.29 6342.34 Manufacturer#3 Brand#35 1190.27 7532.61 -Manufacturer#4 Brand#41 4755.94 7337.62 +Manufacturer#4 Brand#41 4755.94 4755.94 Manufacturer#4 Brand#42 2581.68 7337.62 -Manufacturer#5 Brand#51 1611.66 7672.66 -Manufacturer#5 Brand#52 3254.17 7672.66 +Manufacturer#5 Brand#51 1611.66 1611.66 +Manufacturer#5 Brand#52 3254.17 4865.83 Manufacturer#5 Brand#53 2806.83 7672.66 PREHOOK: query: select p_mfgr, p_brand, s, round(sum(s) over w1 ,2) as s1 @@ -1434,7 +1434,7 @@ POSTHOOK: query: select * from part_3 POSTHOOK: type: QUERY POSTHOOK: Input: default@part_3 #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 2 2 2 +Manufacturer#1 almond antique burnished rose metallic 2 1 1 2 Manufacturer#1 almond antique burnished rose metallic 2 2 2 2 Manufacturer#1 almond antique chartreuse lavender yellow 34 3 3 2 Manufacturer#1 almond antique salmon chartreuse burlywood 6 4 4 2 @@ -1653,7 +1653,7 @@ window w1 as (distribute by p_mfgr sort by p_name rows between 2 preceding and 2 POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 38 4 +Manufacturer#1 almond antique burnished rose metallic 2 38 2 Manufacturer#1 almond antique burnished rose metallic 2 44 4 Manufacturer#1 almond antique chartreuse lavender yellow 34 72 38 Manufacturer#1 almond antique salmon chartreuse burlywood 6 112 44 @@ -2076,31 +2076,31 @@ from part POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### +Manufacturer#1 1173.15 1173.15 1173.15 1458.29 6 +Manufacturer#1 2346.3 1173.15 1173.15 1458.29 6 +Manufacturer#1 4100.06 1173.15 1753.76 1458.29 6 +Manufacturer#1 5702.65 1173.15 1753.76 1458.29 6 +Manufacturer#1 7117.07 1173.15 1753.76 1458.29 6 Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#2 8923.62 1690.68 2031.98 1784.72 5 -Manufacturer#2 8923.62 1690.68 2031.98 1784.72 5 -Manufacturer#2 8923.62 1690.68 2031.98 1784.72 5 +Manufacturer#2 1690.68 1690.68 1690.68 1784.72 5 +Manufacturer#2 3392.28 1690.68 1701.6 1784.72 5 +Manufacturer#2 5090.94 1690.68 1701.6 1784.72 5 +Manufacturer#2 7122.92 1690.68 2031.98 1784.72 5 Manufacturer#2 8923.62 1690.68 2031.98 1784.72 5 -Manufacturer#2 8923.62 1690.68 2031.98 1784.72 5 -Manufacturer#3 7532.61 1190.27 1922.98 1506.52 5 -Manufacturer#3 7532.61 1190.27 1922.98 1506.52 5 -Manufacturer#3 7532.61 1190.27 1922.98 1506.52 5 +Manufacturer#3 1337.29 1190.27 1337.29 1506.52 5 +Manufacturer#3 3008.97 1190.27 1671.68 1506.52 5 +Manufacturer#3 4199.24 1190.27 1671.68 1506.52 5 +Manufacturer#3 5609.63 1190.27 1671.68 1506.52 5 Manufacturer#3 7532.61 1190.27 1922.98 1506.52 5 -Manufacturer#3 7532.61 1190.27 1922.98 1506.52 5 -Manufacturer#4 7337.62 1206.26 1844.92 1467.52 5 -Manufacturer#4 7337.62 1206.26 1844.92 1467.52 5 -Manufacturer#4 7337.62 1206.26 1844.92 1467.52 5 -Manufacturer#4 7337.62 1206.26 1844.92 1467.52 5 +Manufacturer#4 1620.67 1206.26 1620.67 1467.52 5 +Manufacturer#4 2911.02 1206.26 1620.67 1467.52 5 +Manufacturer#4 4755.94 1206.26 1844.92 1467.52 5 +Manufacturer#4 5962.2 1206.26 1844.92 1467.52 5 Manufacturer#4 7337.62 1206.26 1844.92 1467.52 5 -Manufacturer#5 7672.66 1018.1 1789.69 1534.53 5 -Manufacturer#5 7672.66 1018.1 1789.69 1534.53 5 -Manufacturer#5 7672.66 1018.1 1789.69 1534.53 5 -Manufacturer#5 7672.66 1018.1 1789.69 1534.53 5 +Manufacturer#5 1789.69 1018.1 1789.69 1534.53 5 +Manufacturer#5 3401.35 1018.1 1789.69 1534.53 5 +Manufacturer#5 5190.08 1018.1 1789.69 1534.53 5 +Manufacturer#5 6208.18 1018.1 1789.69 1534.53 5 Manufacturer#5 7672.66 1018.1 1789.69 1534.53 5 PREHOOK: query: -- 38. testPartitioningVariousForms2 select p_mfgr, p_name, p_size, diff --git a/ql/src/test/results/clientpositive/ptf_general_queries.q.out b/ql/src/test/results/clientpositive/ptf_general_queries.q.out index a3d6194..86821a9 100644 --- a/ql/src/test/results/clientpositive/ptf_general_queries.q.out +++ b/ql/src/test/results/clientpositive/ptf_general_queries.q.out @@ -64,7 +64,7 @@ from part POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 1173.15 2346.3 1173.15 1173.15 1173.15 +Manufacturer#1 almond antique burnished rose metallic 1173.15 1173.15 1173.15 1173.15 1173.15 Manufacturer#1 almond antique burnished rose metallic 1173.15 2346.3 1173.15 1173.15 1173.15 Manufacturer#1 almond antique chartreuse lavender yellow 1753.76 4100.06 1173.15 1753.76 1366.6866666666667 Manufacturer#1 almond antique salmon chartreuse burlywood 1602.59 5702.650000000001 1173.15 1753.76 1425.6625000000001 diff --git a/ql/src/test/results/clientpositive/spark/ptf.q.out b/ql/src/test/results/clientpositive/spark/ptf.q.out index fd3533c..2d5d308 100644 --- a/ql/src/test/results/clientpositive/spark/ptf.q.out +++ b/ql/src/test/results/clientpositive/spark/ptf.q.out @@ -2247,7 +2247,7 @@ window w1 as (partition by p_mfgr order by p_name rows between 2 preceding and 2 POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 4100.06 +Manufacturer#1 almond antique burnished rose metallic 1 4100.06 Manufacturer#1 almond antique burnished rose metallic 2 5702.650000000001 Manufacturer#1 almond antique chartreuse lavender yellow 3 7117.070000000001 Manufacturer#1 almond antique salmon chartreuse burlywood 4 7576.58 @@ -2478,9 +2478,9 @@ order by p_name POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 1173.15 2 0 -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 2346.3 2 0 -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 3519.4500000000003 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 1 1173.15 1173.15 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 2 1173.15 2346.3 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 3 1173.15 3519.4500000000003 2 0 Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 4692.6 2 0 Manufacturer#1 almond antique chartreuse lavender yellow 5 2 5 1753.76 6446.360000000001 34 32 Manufacturer#1 almond antique salmon chartreuse burlywood 6 3 6 1602.59 8048.950000000001 6 -28 @@ -4009,7 +4009,7 @@ from noop(on POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 1 1 2 4 +Manufacturer#1 almond antique burnished rose metallic 1 1 2 2 Manufacturer#1 almond antique burnished rose metallic 1 1 2 4 Manufacturer#1 almond antique chartreuse lavender yellow 3 2 34 38 Manufacturer#1 almond antique salmon chartreuse burlywood 4 3 6 44 diff --git a/ql/src/test/results/clientpositive/spark/ptf_general_queries.q.out b/ql/src/test/results/clientpositive/spark/ptf_general_queries.q.out index a3d6194..86821a9 100644 --- a/ql/src/test/results/clientpositive/spark/ptf_general_queries.q.out +++ b/ql/src/test/results/clientpositive/spark/ptf_general_queries.q.out @@ -64,7 +64,7 @@ from part POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 1173.15 2346.3 1173.15 1173.15 1173.15 +Manufacturer#1 almond antique burnished rose metallic 1173.15 1173.15 1173.15 1173.15 1173.15 Manufacturer#1 almond antique burnished rose metallic 1173.15 2346.3 1173.15 1173.15 1173.15 Manufacturer#1 almond antique chartreuse lavender yellow 1753.76 4100.06 1173.15 1753.76 1366.6866666666667 Manufacturer#1 almond antique salmon chartreuse burlywood 1602.59 5702.650000000001 1173.15 1753.76 1425.6625000000001 diff --git a/ql/src/test/results/clientpositive/spark/ptf_streaming.q.out b/ql/src/test/results/clientpositive/spark/ptf_streaming.q.out index 8e47b11..d45c7ed 100644 --- a/ql/src/test/results/clientpositive/spark/ptf_streaming.q.out +++ b/ql/src/test/results/clientpositive/spark/ptf_streaming.q.out @@ -1782,9 +1782,9 @@ order by p_name POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 1173.15 2 0 -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 2346.3 2 0 -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 3519.4500000000003 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 1 1173.15 1173.15 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 2 1173.15 2346.3 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 3 1173.15 3519.4500000000003 2 0 Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 4692.6 2 0 Manufacturer#1 almond antique chartreuse lavender yellow 5 2 5 1753.76 6446.360000000001 34 32 Manufacturer#1 almond antique salmon chartreuse burlywood 6 3 6 1602.59 8048.950000000001 6 -28 diff --git a/ql/src/test/results/clientpositive/spark/vectorized_ptf.q.out b/ql/src/test/results/clientpositive/spark/vectorized_ptf.q.out index 2ab2541..8c1d244 100644 --- a/ql/src/test/results/clientpositive/spark/vectorized_ptf.q.out +++ b/ql/src/test/results/clientpositive/spark/vectorized_ptf.q.out @@ -3521,7 +3521,7 @@ window w1 as (partition by p_mfgr order by p_name rows between 2 preceding and 2 POSTHOOK: type: QUERY POSTHOOK: Input: default@part_orc #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 4100.06 +Manufacturer#1 almond antique burnished rose metallic 1 4100.06 Manufacturer#1 almond antique burnished rose metallic 2 5702.650000000001 Manufacturer#1 almond antique chartreuse lavender yellow 3 7117.070000000001 Manufacturer#1 almond antique salmon chartreuse burlywood 4 7576.58 @@ -3888,9 +3888,9 @@ order by p_name POSTHOOK: type: QUERY POSTHOOK: Input: default@part_orc #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 1173.15 2 0 -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 2346.3 2 0 -Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 3519.4500000000003 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 1 1173.15 1173.15 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 2 1173.15 2346.3 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 3 1173.15 3519.4500000000003 2 0 Manufacturer#1 almond antique burnished rose metallic 1 1 4 1173.15 4692.6 2 0 Manufacturer#1 almond antique chartreuse lavender yellow 5 2 5 1753.76 6446.360000000001 34 32 Manufacturer#1 almond antique salmon chartreuse burlywood 6 3 6 1602.59 8048.950000000001 6 -28 @@ -5964,7 +5964,7 @@ from noop(on POSTHOOK: type: QUERY POSTHOOK: Input: default@part_orc #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 1 1 2 4 +Manufacturer#1 almond antique burnished rose metallic 1 1 2 2 Manufacturer#1 almond antique burnished rose metallic 1 1 2 4 Manufacturer#1 almond antique chartreuse lavender yellow 3 2 34 38 Manufacturer#1 almond antique salmon chartreuse burlywood 4 3 6 44 diff --git a/ql/src/test/results/clientpositive/spark/windowing.q.out b/ql/src/test/results/clientpositive/spark/windowing.q.out index 72b2245..87d85c8 100644 --- a/ql/src/test/results/clientpositive/spark/windowing.q.out +++ b/ql/src/test/results/clientpositive/spark/windowing.q.out @@ -154,7 +154,7 @@ from part POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 +Manufacturer#1 almond antique burnished rose metallic 1 Manufacturer#1 almond antique burnished rose metallic 2 Manufacturer#1 almond antique chartreuse lavender yellow 3 Manufacturer#1 almond antique salmon chartreuse burlywood 4 @@ -202,7 +202,7 @@ from part POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 1 1 2 1173.15 1173.15 2 0 +Manufacturer#1 almond antique burnished rose metallic 1 1 1 1173.15 1173.15 2 0 Manufacturer#1 almond antique burnished rose metallic 1 1 2 1173.15 2346.3 2 0 Manufacturer#1 almond antique chartreuse lavender yellow 3 2 3 1753.76 4100.06 34 32 Manufacturer#1 almond antique salmon chartreuse burlywood 4 3 4 1602.59 5702.650000000001 6 -28 @@ -254,11 +254,11 @@ from part POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### +1 1 1 1173.15 0 1 1 1 1620.67 0 1 1 1 1671.68 0 1 1 1 1690.68 0 1 1 1 1789.69 0 -1 1 2 1173.15 0 1 1 2 2346.3 0 2 2 2 2861.95 -3 2 2 2 2996.09 29 @@ -659,7 +659,7 @@ window w1 as (distribute by p_mfgr sort by p_mfgr, p_name rows between 2 precedi POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 1 1 0.3333333333333333 0.0 1 2 2.0 0.0 2 2 2 +Manufacturer#1 almond antique burnished rose metallic 2 1 1 0.3333333333333333 0.0 1 1 2.0 0.0 2 2 2 Manufacturer#1 almond antique burnished rose metallic 2 1 1 0.3333333333333333 0.0 1 2 2.0 0.0 2 2 2 Manufacturer#1 almond antique chartreuse lavender yellow 34 3 2 0.5 0.4 2 3 12.666666666666666 15.084944665313014 2 34 2 Manufacturer#1 almond antique salmon chartreuse burlywood 6 4 3 0.6666666666666666 0.6 2 4 11.0 13.379088160259652 2 6 2 @@ -757,7 +757,7 @@ window w1 as (distribute by p_mfgr sort by p_mfgr, p_name rows between 2 precedi POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 2 2 2 +Manufacturer#1 almond antique burnished rose metallic 2 1 1 2 Manufacturer#1 almond antique burnished rose metallic 2 2 2 2 Manufacturer#1 almond antique chartreuse lavender yellow 34 3 3 2 Manufacturer#1 almond antique salmon chartreuse burlywood 6 4 4 2 @@ -1022,21 +1022,21 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@mfgr_price_view POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 Brand#12 4800.84 8749.73 -Manufacturer#1 Brand#14 2346.3 8749.73 +Manufacturer#1 Brand#12 4800.84 4800.84 +Manufacturer#1 Brand#14 2346.3 7147.14 Manufacturer#1 Brand#15 1602.59 8749.73 -Manufacturer#2 Brand#22 3491.38 8923.62 -Manufacturer#2 Brand#23 2031.98 8923.62 -Manufacturer#2 Brand#24 1698.66 8923.62 +Manufacturer#2 Brand#22 3491.38 3491.38 +Manufacturer#2 Brand#23 2031.98 5523.36 +Manufacturer#2 Brand#24 1698.66 7222.02 Manufacturer#2 Brand#25 1701.6 8923.62 -Manufacturer#3 Brand#31 1671.68 7532.61 -Manufacturer#3 Brand#32 3333.37 7532.61 -Manufacturer#3 Brand#34 1337.29 7532.61 +Manufacturer#3 Brand#31 1671.68 1671.68 +Manufacturer#3 Brand#32 3333.37 5005.05 +Manufacturer#3 Brand#34 1337.29 6342.34 Manufacturer#3 Brand#35 1190.27 7532.61 -Manufacturer#4 Brand#41 4755.94 7337.62 +Manufacturer#4 Brand#41 4755.94 4755.94 Manufacturer#4 Brand#42 2581.68 7337.62 -Manufacturer#5 Brand#51 1611.66 7672.66 -Manufacturer#5 Brand#52 3254.17 7672.66 +Manufacturer#5 Brand#51 1611.66 1611.66 +Manufacturer#5 Brand#52 3254.17 4865.83 Manufacturer#5 Brand#53 2806.83 7672.66 PREHOOK: query: select p_mfgr, p_brand, s, round(sum(s) over w1 ,2) as s1 @@ -1434,7 +1434,7 @@ POSTHOOK: query: select * from part_3 POSTHOOK: type: QUERY POSTHOOK: Input: default@part_3 #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 2 2 2 +Manufacturer#1 almond antique burnished rose metallic 2 1 1 2 Manufacturer#1 almond antique burnished rose metallic 2 2 2 2 Manufacturer#1 almond antique chartreuse lavender yellow 34 3 3 2 Manufacturer#1 almond antique salmon chartreuse burlywood 6 4 4 2 @@ -1653,7 +1653,7 @@ window w1 as (distribute by p_mfgr sort by p_name rows between 2 preceding and 2 POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### -Manufacturer#1 almond antique burnished rose metallic 2 38 4 +Manufacturer#1 almond antique burnished rose metallic 2 38 2 Manufacturer#1 almond antique burnished rose metallic 2 44 4 Manufacturer#1 almond antique chartreuse lavender yellow 34 72 38 Manufacturer#1 almond antique salmon chartreuse burlywood 6 112 44 @@ -2071,31 +2071,31 @@ from part POSTHOOK: type: QUERY POSTHOOK: Input: default@part #### A masked pattern was here #### +Manufacturer#1 1173.15 1173.15 1173.15 1458.29 6 +Manufacturer#1 2346.3 1173.15 1173.15 1458.29 6 +Manufacturer#1 4100.06 1173.15 1753.76 1458.29 6 +Manufacturer#1 5702.65 1173.15 1753.76 1458.29 6 +Manufacturer#1 7117.07 1173.15 1753.76 1458.29 6 Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#1 8749.73 1173.15 1753.76 1458.29 6 -Manufacturer#2 8923.62 1690.68 2031.98 1784.72 5 -Manufacturer#2 8923.62 1690.68 2031.98 1784.72 5 -Manufacturer#2 8923.62 1690.68 2031.98 1784.72 5 +Manufacturer#2 1690.68 1690.68 1690.68 1784.72 5 +Manufacturer#2 3491.38 1690.68 1800.7 1784.72 5 +Manufacturer#2 5523.36 1690.68 2031.98 1784.72 5 +Manufacturer#2 7222.02 1690.68 2031.98 1784.72 5 Manufacturer#2 8923.62 1690.68 2031.98 1784.72 5 -Manufacturer#2 8923.62 1690.68 2031.98 1784.72 5 -Manufacturer#3 7532.61 1190.27 1922.98 1506.52 5 -Manufacturer#3 7532.61 1190.27 1922.98 1506.52 5 -Manufacturer#3 7532.61 1190.27 1922.98 1506.52 5 +Manufacturer#3 1671.68 1190.27 1671.68 1506.52 5 +Manufacturer#3 2861.95 1190.27 1671.68 1506.52 5 +Manufacturer#3 4272.34 1190.27 1671.68 1506.52 5 +Manufacturer#3 6195.32 1190.27 1922.98 1506.52 5 Manufacturer#3 7532.61 1190.27 1922.98 1506.52 5 -Manufacturer#3 7532.61 1190.27 1922.98 1506.52 5 -Manufacturer#4 7337.62 1206.26 1844.92 1467.52 5 -Manufacturer#4 7337.62 1206.26 1844.92 1467.52 5 -Manufacturer#4 7337.62 1206.26 1844.92 1467.52 5 -Manufacturer#4 7337.62 1206.26 1844.92 1467.52 5 +Manufacturer#4 1620.67 1206.26 1620.67 1467.52 5 +Manufacturer#4 2996.09 1206.26 1620.67 1467.52 5 +Manufacturer#4 4202.35 1206.26 1620.67 1467.52 5 +Manufacturer#4 6047.27 1206.26 1844.92 1467.52 5 Manufacturer#4 7337.62 1206.26 1844.92 1467.52 5 -Manufacturer#5 7672.66 1018.1 1789.69 1534.53 5 -Manufacturer#5 7672.66 1018.1 1789.69 1534.53 5 -Manufacturer#5 7672.66 1018.1 1789.69 1534.53 5 -Manufacturer#5 7672.66 1018.1 1789.69 1534.53 5 +Manufacturer#5 1789.69 1018.1 1789.69 1534.53 5 +Manufacturer#5 3401.35 1018.1 1789.69 1534.53 5 +Manufacturer#5 5190.08 1018.1 1789.69 1534.53 5 +Manufacturer#5 6208.18 1018.1 1789.69 1534.53 5 Manufacturer#5 7672.66 1018.1 1789.69 1534.53 5 PREHOOK: query: -- 38. testPartitioningVariousForms2 select p_mfgr, p_name, p_size, diff --git a/ql/src/test/results/clientpositive/temp_table_windowing_expressions.q.out b/ql/src/test/results/clientpositive/temp_table_windowing_expressions.q.out index 61a74f0..6905235 100644 --- a/ql/src/test/results/clientpositive/temp_table_windowing_expressions.q.out +++ b/ql/src/test/results/clientpositive/temp_table_windowing_expressions.q.out @@ -670,7 +670,7 @@ POSTHOOK: Input: default@t1 #### A masked pattern was here #### 65542 rachel thompson 131088 oscar brown -262258 wendy steinbeck +196673 wendy steinbeck PREHOOK: query: select * from t2 limit 3 PREHOOK: type: QUERY PREHOOK: Input: default@t2 @@ -681,7 +681,7 @@ POSTHOOK: Input: default@t2 #### A masked pattern was here #### 65542 rachel thompson 131088 oscar brown -262258 wendy steinbeck +196673 wendy steinbeck PREHOOK: query: select p_mfgr, p_retailprice, p_size, round(sum(p_retailprice) over w1 , 2) + 50.0 = round(sum(lag(p_retailprice,1,50.0)) over w1 + (last_value(p_retailprice) over w1),2) from part diff --git a/ql/src/test/results/clientpositive/windowing_decimal.q.out b/ql/src/test/results/clientpositive/windowing_decimal.q.out index b157a23..6f3008a 100644 --- a/ql/src/test/results/clientpositive/windowing_decimal.q.out +++ b/ql/src/test/results/clientpositive/windowing_decimal.q.out @@ -57,7 +57,7 @@ from part_dec POSTHOOK: type: QUERY POSTHOOK: Input: default@part_dec #### A masked pattern was here #### -Manufacturer#1 1173.150 1173.150 2346.300 +Manufacturer#1 1173.150 1173.150 1173.150 Manufacturer#1 1173.150 1173.150 2346.300 Manufacturer#1 1414.420 1173.150 3760.720 Manufacturer#1 1602.590 1173.150 5363.310 diff --git a/ql/src/test/results/clientpositive/windowing_expressions.q.out b/ql/src/test/results/clientpositive/windowing_expressions.q.out index c91403b..2aaaca1 100644 --- a/ql/src/test/results/clientpositive/windowing_expressions.q.out +++ b/ql/src/test/results/clientpositive/windowing_expressions.q.out @@ -670,7 +670,7 @@ POSTHOOK: Input: default@t1 #### A masked pattern was here #### 65542 rachel thompson 131088 oscar brown -262258 wendy steinbeck +196673 wendy steinbeck PREHOOK: query: select * from t2 limit 3 PREHOOK: type: QUERY PREHOOK: Input: default@t2 @@ -681,7 +681,7 @@ POSTHOOK: Input: default@t2 #### A masked pattern was here #### 65542 rachel thompson 131088 oscar brown -262258 wendy steinbeck +196673 wendy steinbeck PREHOOK: query: select p_mfgr, p_retailprice, p_size, round(sum(p_retailprice) over w1 , 2) + 50.0 = round(sum(lag(p_retailprice,1,50.0)) over w1 + (last_value(p_retailprice) over w1),2) from part diff --git a/ql/src/test/results/clientpositive/windowing_multipartitioning.q.out b/ql/src/test/results/clientpositive/windowing_multipartitioning.q.out index ef48677..0fcde7f 100644 --- a/ql/src/test/results/clientpositive/windowing_multipartitioning.q.out +++ b/ql/src/test/results/clientpositive/windowing_multipartitioning.q.out @@ -57,7 +57,7 @@ alice allen 2 8589934990 alice allen 3 12884902428 alice allen 4 17179869743 alice allen 5 21474837237 -alice allen 6 30064772191 +alice allen 6 25769804666 alice allen 6 30064772191 alice allen 8 34359739722 alice brown 1 4294967391 @@ -93,7 +93,7 @@ alice davidson 6 25769804493 alice davidson 7 30064772010 alice davidson 8 34359739463 alice davidson 9 38654706943 -alice davidson 10 47244641824 +alice davidson 10 42949674279 alice davidson 10 47244641824 alice davidson 12 51539609264 alice davidson 13 55834576590 @@ -124,10 +124,10 @@ alice falkner 4 17179869431 alice falkner 5 21474836879 alice falkner 6 25769804283 alice falkner 7 30064771719 -alice falkner 8 38654706491 +alice falkner 8 34359739019 alice falkner 8 38654706491 alice falkner 10 42949673903 -alice falkner 11 51539608896 +alice falkner 11 47244641368 alice falkner 11 51539608896 alice falkner 13 55834576336 alice falkner 14 60129543752 @@ -143,7 +143,7 @@ alice garcia 6 25769804353 alice garcia 7 30064771681 alice garcia 8 34359739213 alice garcia 9 38654706564 -alice garcia 10 47244641402 +alice garcia 10 42949674033 alice garcia 10 47244641402 alice garcia 12 51539608899 alice garcia 13 55834576425 @@ -168,35 +168,35 @@ where s = 'tom allen' or s = 'bob steinbeck' POSTHOOK: type: QUERY POSTHOOK: Input: default@over10k #### A masked pattern was here #### -bob steinbeck 11 47244642041 -bob steinbeck 1 47244642041 -bob steinbeck 2 47244642041 -bob steinbeck 7 47244642041 -bob steinbeck 8 47244642041 -bob steinbeck 9 47244642041 -bob steinbeck 6 47244642041 -bob steinbeck 10 47244642041 -bob steinbeck 3 47244642041 -bob steinbeck 4 47244642041 +bob steinbeck 11 4294967344 +bob steinbeck 1 8589934849 +bob steinbeck 2 12884902321 +bob steinbeck 7 17179869870 +bob steinbeck 8 21474837212 +bob steinbeck 9 25769804712 +bob steinbeck 6 30064772008 +bob steinbeck 10 34359739552 +bob steinbeck 3 38654707094 +bob steinbeck 4 42949674515 bob steinbeck 5 47244642041 -tom allen 9 81604381169 -tom allen 3 81604381169 -tom allen 7 81604381169 -tom allen 16 81604381169 -tom allen 8 81604381169 -tom allen 10 81604381169 -tom allen 15 81604381169 -tom allen 2 81604381169 -tom allen 6 81604381169 -tom allen 18 81604381169 -tom allen 1 81604381169 -tom allen 5 81604381169 -tom allen 19 81604381169 -tom allen 17 81604381169 -tom allen 11 81604381169 -tom allen 4 81604381169 -tom allen 12 81604381169 -tom allen 13 81604381169 +tom allen 9 4294967478 +tom allen 3 8589934816 +tom allen 7 12884902321 +tom allen 16 17179869673 +tom allen 8 21474837072 +tom allen 10 25769804454 +tom allen 15 30064771969 +tom allen 2 34359739365 +tom allen 6 38654706862 +tom allen 18 42949674383 +tom allen 1 47244641842 +tom allen 5 51539609307 +tom allen 19 55834576824 +tom allen 17 60129544192 +tom allen 11 64424511531 +tom allen 4 68719478972 +tom allen 12 73014446496 +tom allen 13 77309413835 tom allen 14 81604381169 PREHOOK: query: select s, sum(i) over (partition by s), sum(f) over (partition by si) from over10k where s = 'tom allen' or s = 'bob steinbeck' PREHOOK: type: QUERY diff --git a/ql/src/test/results/clientpositive/windowing_udaf.q.out b/ql/src/test/results/clientpositive/windowing_udaf.q.out index 298c1dd..ce4a86c 100644 --- a/ql/src/test/results/clientpositive/windowing_udaf.q.out +++ b/ql/src/test/results/clientpositive/windowing_udaf.q.out @@ -232,12 +232,12 @@ wendy brown 49.7678125500679 xavier brown 49.81303030071837 yuri brown 49.74735299278708 yuri nixon 49.86571431841169 -zach hernandez 49.37763158898605 -zach hernandez 49.37763158898605 +zach hernandez 50.219166702694366 +zach hernandez 50.17270273775668 zach hernandez 49.37763158898605 zach underhill 50.13846162649301 zach zipper 51.274500131607056 -alice nixon 31.255000591278076 +alice nixon 13.380000114440918 alice nixon 31.255000591278076 bob falkner 51.356666247049965 calvin davidson 39.96249973773956 @@ -259,7 +259,7 @@ nick king 54.01842131112751 nick xylophone 54.5635001540184 oscar van buren 55.146666697093416 priscilla underhill 56.049545580690555 -priscilla zipper 55.24625018239021 +priscilla zipper 54.98565229125645 PREHOOK: query: select s, avg(i) over (partition by t, b order by s) from over10k limit 100 PREHOOK: type: QUERY PREHOOK: Input: default@over10k diff --git a/ql/src/test/results/clientpositive/windowing_windowspec.q.out b/ql/src/test/results/clientpositive/windowing_windowspec.q.out index 8d78c22..b055fc5 100644 --- a/ql/src/test/results/clientpositive/windowing_windowspec.q.out +++ b/ql/src/test/results/clientpositive/windowing_windowspec.q.out @@ -634,7 +634,7 @@ gabriella underhill 853497 holly falkner 919218 holly thompson 985000 irene brown 1050757 -jessica brown 1182155 +jessica brown 1116483 jessica brown 1182155 jessica nixon 1247815 jessica robinson 1313437 @@ -653,7 +653,7 @@ priscilla hernandez 2101353 priscilla zipper 2166925 quinn allen 2232487 quinn ovid 2298060 -rachel ovid 2429366 +rachel ovid 2363791 rachel ovid 2429366 rachel robinson 2495140 rachel young 2560880 @@ -687,7 +687,7 @@ priscilla thompson 1051347 quinn van buren 1117102 rachel davidson 1182710 rachel ellison 1248448 -rachel ichabod 1379923 +rachel ichabod 1314171 rachel ichabod 1379923 rachel polk 1445518 sarah falkner 1511234