Repository: hive Updated Branches: refs/heads/master 6a2993912 -> ad62e2ede
HIVE-10650 : Improve sum() function over windowing to support additional range formats (Aihua Xu via Ashutosh Chauhan) Signed-off-by: Ashutosh Chauhan <hashut...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/ad62e2ed Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/ad62e2ed Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/ad62e2ed Branch: refs/heads/master Commit: ad62e2ede556558eb5eb0158c5f2fe069234a821 Parents: 6a29939 Author: Aihua Xu <aihu...@gmail.com> Authored: Tue May 12 14:45:00 2015 -0700 Committer: Ashutosh Chauhan <hashut...@apache.org> Committed: Thu May 14 19:31:14 2015 -0700 ---------------------------------------------------------------------- .../hadoop/hive/ql/parse/PTFTranslator.java | 9 +- .../hadoop/hive/ql/parse/WindowingSpec.java | 2 +- .../hadoop/hive/ql/plan/ptf/BoundaryDef.java | 37 +- .../hadoop/hive/ql/plan/ptf/CurrentRowDef.java | 12 +- .../hive/ql/plan/ptf/RangeBoundaryDef.java | 38 +- .../hive/ql/plan/ptf/ValueBoundaryDef.java | 50 +- .../hadoop/hive/ql/plan/ptf/WindowFrameDef.java | 13 +- .../generic/GenericUDAFStreamingEvaluator.java | 40 +- .../hadoop/hive/ql/udaf/TestStreamingSum.java | 10 +- .../clientpositive/windowing_windowspec.q | 2 - .../clientpositive/windowing_windowspec2.q | 24 + .../clientpositive/windowing_windowspec.q.out | 108 ----- .../clientpositive/windowing_windowspec2.q.out | 478 +++++++++++++++++++ 13 files changed, 661 insertions(+), 162 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/ad62e2ed/ql/src/java/org/apache/hadoop/hive/ql/parse/PTFTranslator.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/PTFTranslator.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/PTFTranslator.java index d7f1c7f..c1b8a1d 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/PTFTranslator.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/PTFTranslator.java @@ -545,9 +545,7 @@ public class PTFTranslator { throws SemanticException { if (bndSpec instanceof ValueBoundarySpec) { ValueBoundarySpec vBndSpec = (ValueBoundarySpec) bndSpec; - ValueBoundaryDef vbDef = new ValueBoundaryDef(); - vbDef.setAmt(vBndSpec.getAmt()); - vbDef.setDirection(vBndSpec.getDirection()); + ValueBoundaryDef vbDef = new ValueBoundaryDef(vBndSpec.getDirection(), vBndSpec.getAmt()); PTFTranslator.validateNoLeadLagInValueBoundarySpec(vBndSpec.getExpression()); PTFExpressionDef exprDef = null; try { @@ -561,10 +559,7 @@ public class PTFTranslator { } else if (bndSpec instanceof RangeBoundarySpec) { RangeBoundarySpec rBndSpec = (RangeBoundarySpec) bndSpec; - RangeBoundaryDef rbDef = new RangeBoundaryDef(); - rbDef.setAmt(rBndSpec.getAmt()); - rbDef.setDirection(rBndSpec.getDirection()); - return rbDef; + return new RangeBoundaryDef(rBndSpec.getDirection(), rBndSpec.getAmt()); } else if (bndSpec instanceof CurrentRowSpec) { CurrentRowDef cbDef = new CurrentRowDef(); return cbDef; http://git-wip-us.apache.org/repos/asf/hive/blob/ad62e2ed/ql/src/java/org/apache/hadoop/hive/ql/parse/WindowingSpec.java ---------------------------------------------------------------------- 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 6dfa214..50f86df 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 @@ -274,7 +274,7 @@ public class WindowingSpec { } if ( end.getDirection() == Direction.PRECEDING && - start.getAmt() == BoundarySpec.UNBOUNDED_AMOUNT ) { + end.getAmt() == BoundarySpec.UNBOUNDED_AMOUNT ) { throw new SemanticException("End of a WindowFrame cannot be UNBOUNDED PRECEDING"); } http://git-wip-us.apache.org/repos/asf/hive/blob/ad62e2ed/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/BoundaryDef.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/BoundaryDef.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/BoundaryDef.java index eeb094c..c6518dc 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/BoundaryDef.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/BoundaryDef.java @@ -28,11 +28,42 @@ public abstract class BoundaryDef { return direction; } - public void setDirection(Direction direction) { - this.direction = direction; + /** + * Returns if the bound is PRECEDING. + * @return if the bound is PRECEDING + */ + public boolean isPreceding() { + return false; } + /** + * Returns if the bound is FOLLOWING. + * @return if the bound is FOLLOWING + */ + public boolean isFollowing() { + return false; + } + + /** + * Returns if the bound is CURRENT ROW. + * @return if the bound is CURRENT ROW + */ + public boolean isCurrentRow() { + return false; + } + + /** + * Returns offset from XX PRECEDING/FOLLOWING. + * + * @return offset from XX PRECEDING/FOLLOWING + */ public abstract int getAmt(); + /** + * Returns signed offset from XX PRECEDING/FOLLOWING. Nagative for preceding. + * + * @return signed offset from XX PRECEDING/FOLLOWING + */ + public abstract int getRelativeOffset(); public boolean isUnbounded() { return this.getAmt() == BoundarySpec.UNBOUNDED_AMOUNT; @@ -43,4 +74,4 @@ public abstract class BoundaryDef { return direction == null ? "" : direction + "(" + (getAmt() == Integer.MAX_VALUE ? "MAX" : getAmt()) + ")"; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/hive/blob/ad62e2ed/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/CurrentRowDef.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/CurrentRowDef.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/CurrentRowDef.java index 768fae0..f5e2848 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/CurrentRowDef.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/CurrentRowDef.java @@ -35,4 +35,14 @@ public class CurrentRowDef extends BoundaryDef { public int getAmt() { return 0; } -} \ No newline at end of file + + @Override + public boolean isCurrentRow() { + return true; + } + + @Override + public int getRelativeOffset() { + return 0; + } +} http://git-wip-us.apache.org/repos/asf/hive/blob/ad62e2ed/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/RangeBoundaryDef.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/RangeBoundaryDef.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/RangeBoundaryDef.java index ce57625..f93399d 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/RangeBoundaryDef.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/RangeBoundaryDef.java @@ -18,9 +18,28 @@ package org.apache.hadoop.hive.ql.plan.ptf; +import org.apache.hadoop.hive.ql.parse.WindowingSpec.Direction; public class RangeBoundaryDef extends BoundaryDef { private int amt; + private final int relativeOffset; + + public RangeBoundaryDef(Direction direction, int amt) { + this.direction = direction; + this.amt = amt; + + // Calculate relative offset + switch(this.direction) { + case PRECEDING: + relativeOffset = -amt; + break; + case FOLLOWING: + relativeOffset = amt; + break; + default: + relativeOffset = 0; + } + } public int compareTo(BoundaryDef other) { int c = getDirection().compareTo(other.getDirection()); @@ -28,7 +47,7 @@ public class RangeBoundaryDef extends BoundaryDef { return c; } RangeBoundaryDef rb = (RangeBoundaryDef) other; - return getAmt() - rb.getAmt(); + return this.direction == Direction.PRECEDING ? rb.amt - this.amt : this.amt - rb.amt; } @Override @@ -36,7 +55,18 @@ public class RangeBoundaryDef extends BoundaryDef { return amt; } - public void setAmt(int amt) { - this.amt = amt; + @Override + public boolean isPreceding() { + return this.direction == Direction.PRECEDING; + } + + @Override + public boolean isFollowing() { + return this.direction == Direction.FOLLOWING; + } + + @Override + public int getRelativeOffset() { + return relativeOffset; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/hive/blob/ad62e2ed/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/ValueBoundaryDef.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/ValueBoundaryDef.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/ValueBoundaryDef.java index e89578c..3725ac8 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/ValueBoundaryDef.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/ValueBoundaryDef.java @@ -18,13 +18,30 @@ package org.apache.hadoop.hive.ql.plan.ptf; -import org.apache.hadoop.hive.ql.exec.ExprNodeEvaluator; -import org.apache.hadoop.hive.ql.plan.ExprNodeDesc; +import org.apache.hadoop.hive.ql.parse.WindowingSpec.Direction; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; public class ValueBoundaryDef extends BoundaryDef { private PTFExpressionDef expressionDef; - private int amt; + private final int amt; + private final int relativeOffset; + + public ValueBoundaryDef(Direction direction, int amt) { + this.direction = direction; + this.amt = amt; + + // Calculate relative offset + switch(this.direction) { + case PRECEDING: + relativeOffset = -amt; + break; + case FOLLOWING: + relativeOffset = amt; + break; + default: + relativeOffset = 0; + } + } public int compareTo(BoundaryDef other) { int c = getDirection().compareTo(other.getDirection()); @@ -32,7 +49,7 @@ public class ValueBoundaryDef extends BoundaryDef { return c; } ValueBoundaryDef vb = (ValueBoundaryDef) other; - return getAmt() - vb.getAmt(); + return this.direction == Direction.PRECEDING ? vb.amt - this.amt : this.amt - vb.amt; } public PTFExpressionDef getExpressionDef() { @@ -43,14 +60,6 @@ public class ValueBoundaryDef extends BoundaryDef { this.expressionDef = expressionDef; } - public ExprNodeDesc getExprNode() { - return expressionDef == null ? null : expressionDef.getExprNode(); - } - - public ExprNodeEvaluator getExprEvaluator() { - return expressionDef == null ? null : expressionDef.getExprEvaluator(); - } - public ObjectInspector getOI() { return expressionDef == null ? null : expressionDef.getOI(); } @@ -60,7 +69,18 @@ public class ValueBoundaryDef extends BoundaryDef { return amt; } - public void setAmt(int amt) { - this.amt = amt; + @Override + public int getRelativeOffset() { + return relativeOffset; + } + + @Override + public boolean isPreceding() { + return this.direction == Direction.PRECEDING; + } + + @Override + public boolean isFollowing() { + return this.direction == Direction.FOLLOWING; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/hive/blob/ad62e2ed/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/WindowFrameDef.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/WindowFrameDef.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/WindowFrameDef.java index d153b08..5a85f69 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/WindowFrameDef.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/ptf/WindowFrameDef.java @@ -22,11 +22,20 @@ package org.apache.hadoop.hive.ql.plan.ptf; public class WindowFrameDef { private BoundaryDef start; private BoundaryDef end; + private final int windowSize; public WindowFrameDef(BoundaryDef start, BoundaryDef end) { this.start = start; this.end = end; + + // Calculate window size + if (start.getDirection() == end.getDirection()) { + windowSize = Math.abs(end.getAmt() - start.getAmt()) + 1; + } else { + windowSize = end.getAmt() + start.getAmt() + 1; + } } + public BoundaryDef getStart() { return start; } @@ -44,11 +53,11 @@ public class WindowFrameDef { } public int getWindowSize() { - return end.getAmt() + start.getAmt() + 1; + return windowSize; } @Override public String toString() { return start + "~" + end; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/hive/blob/ad62e2ed/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFStreamingEvaluator.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFStreamingEvaluator.java b/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFStreamingEvaluator.java index 578c356..f27d066 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFStreamingEvaluator.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFStreamingEvaluator.java @@ -65,7 +65,7 @@ public abstract class GenericUDAFStreamingEvaluator<T1> extends class StreamingState extends AbstractAggregationBuffer { final AggregationBuffer wrappedBuf; - final List<T1> results; + final List<T1> results; // Hold the aggregation results for each row in the partition int numRows; // Number of rows processed in the partition. StreamingState(AggregationBuffer buf) { @@ -127,7 +127,7 @@ public abstract class GenericUDAFStreamingEvaluator<T1> extends class SumAvgStreamingState extends StreamingState { - final List<T2> intermediateVals; + final List<T2> intermediateVals; // Keep track of S[0..x] SumAvgStreamingState(AggregationBuffer buf) { super(buf); @@ -163,20 +163,23 @@ public abstract class GenericUDAFStreamingEvaluator<T1> extends } /** - * After the number of rows processed is more than the size of FOLLOWING window, - * we can generate a PTF result for a previous row when a new row gets processed. + * For the cases "X preceding and Y preceding" or the number of processed rows + * is more than the size of FOLLOWING window, we are able to generate a PTF result + * for a previous row. * @return */ public boolean hasResultReady() { - return this.numRows >= wFrameDef.getEnd().getAmt(); + return this.numRows >= wFrameDef.getEnd().getRelativeOffset(); } /** - * Retrieve the next stored intermediate result to generate the result for next available row + * Retrieve the next stored intermediate result, i.e., + * Get S[x-1] in the computation of S[x..y] = S[y] - S[x-1]. */ public T2 retrieveNextIntermediateValue() { if (!wFrameDef.getStart().isUnbounded() - && (this.numRows - wFrameDef.getEnd().getAmt()) >= (wFrameDef.getStart().getAmt() + 1)) { + && !this.intermediateVals.isEmpty() + && this.numRows >= wFrameDef.getWindowSize()) { return this.intermediateVals.remove(0); } @@ -196,11 +199,20 @@ public abstract class GenericUDAFStreamingEvaluator<T1> extends SumAvgStreamingState ss = (SumAvgStreamingState) agg; wrappedEval.iterate(ss.wrappedBuf, parameters); - // Generate the result for a previous row, of whose window all the rows have been processed. + + // We need to insert 'null' before processing first row for the case: X preceding and y preceding + if (ss.numRows == 0) { + for (int i = wFrameDef.getEnd().getRelativeOffset(); i < 0; i++) { + ss.results.add(null); + } + } + + // Generate the result for the windowing ending at the current row if (ss.hasResultReady()) { ss.results.add(getNextResult(ss)); } - if (!wFrameDef.isStartUnbounded()) { + if (!wFrameDef.isStartUnbounded() + && ss.numRows + 1 >= wFrameDef.getStart().getRelativeOffset()) { ss.intermediateVals.add(getCurrentIntermediateResult(ss)); } @@ -212,11 +224,17 @@ public abstract class GenericUDAFStreamingEvaluator<T1> extends SumAvgStreamingState ss = (SumAvgStreamingState) agg; Object o = wrappedEval.terminate(ss.wrappedBuf); - // After all the rows are processed, continue to generate results for the rows that results haven't generate - for (int i = 0; i < wFrameDef.getEnd().getAmt(); i++) { + // After all the rows are processed, continue to generate results for the rows that results haven't generated. + // For the case: X following and Y following, process first Y-X results and then insert X nulls. + // For the case X preceding and Y following, process Y results. + for (int i = Math.max(0, wFrameDef.getStart().getRelativeOffset()); i < wFrameDef.getEnd().getRelativeOffset(); i++) { ss.results.add(getNextResult(ss)); ss.numRows++; } + for (int i = 0; i < wFrameDef.getStart().getRelativeOffset(); i++) { + ss.results.add(null); + ss.numRows++; + } return o; } http://git-wip-us.apache.org/repos/asf/hive/blob/ad62e2ed/ql/src/test/org/apache/hadoop/hive/ql/udaf/TestStreamingSum.java ---------------------------------------------------------------------- diff --git a/ql/src/test/org/apache/hadoop/hive/ql/udaf/TestStreamingSum.java b/ql/src/test/org/apache/hadoop/hive/ql/udaf/TestStreamingSum.java index 88cafc0..c26de3f 100644 --- a/ql/src/test/org/apache/hadoop/hive/ql/udaf/TestStreamingSum.java +++ b/ql/src/test/org/apache/hadoop/hive/ql/udaf/TestStreamingSum.java @@ -54,19 +54,13 @@ public class TestStreamingSum { if (p == 0) { start = new CurrentRowDef(); } else { - RangeBoundaryDef startR = new RangeBoundaryDef(); - startR.setDirection(Direction.PRECEDING); - startR.setAmt(p); - start = startR; + start = new RangeBoundaryDef(Direction.PRECEDING, p); } if (f == 0) { end = new CurrentRowDef(); } else { - RangeBoundaryDef endR = new RangeBoundaryDef(); - endR.setDirection(Direction.FOLLOWING); - endR.setAmt(f); - end = endR; + end = new RangeBoundaryDef(Direction.FOLLOWING, f); } return new WindowFrameDef(start, end); http://git-wip-us.apache.org/repos/asf/hive/blob/ad62e2ed/ql/src/test/queries/clientpositive/windowing_windowspec.q ---------------------------------------------------------------------- diff --git a/ql/src/test/queries/clientpositive/windowing_windowspec.q b/ql/src/test/queries/clientpositive/windowing_windowspec.q index 202eb74..63f97b7 100644 --- a/ql/src/test/queries/clientpositive/windowing_windowspec.q +++ b/ql/src/test/queries/clientpositive/windowing_windowspec.q @@ -31,8 +31,6 @@ select s, sum(i) over(partition by ts order by s) from over10k limit 100; select f, sum(f) over (partition by ts order by f range between unbounded preceding and current row) from over10k limit 100; -select f, sum(f) over (partition by ts order by f rows between 2 preceding and 1 preceding) from over10k limit 100; - select s, i, round(avg(d) over (partition by s order by i) / 10.0 , 2) from over10k limit 7; select s, i, round((avg(d) over w1 + 10.0) - (avg(d) over w1 - 10.0),2) from over10k window w1 as (partition by s order by i) limit 7; http://git-wip-us.apache.org/repos/asf/hive/blob/ad62e2ed/ql/src/test/queries/clientpositive/windowing_windowspec2.q ---------------------------------------------------------------------- diff --git a/ql/src/test/queries/clientpositive/windowing_windowspec2.q b/ql/src/test/queries/clientpositive/windowing_windowspec2.q new file mode 100644 index 0000000..3e8aa93 --- /dev/null +++ b/ql/src/test/queries/clientpositive/windowing_windowspec2.q @@ -0,0 +1,24 @@ +drop table over10k; + +create table over10k( + t tinyint, + si smallint, + i int, + b bigint, + f float, + d double, + bo boolean, + s string, + ts timestamp, + dec decimal, + bin binary) + row format delimited + fields terminated by '|'; + +load data local inpath '../../data/files/over10k' into table over10k; + +select ts, f, sum(f) over (partition by ts order by f rows between 2 preceding and 1 preceding) from over10k limit 100; +select ts, f, sum(f) over (partition by ts order by f rows between unbounded preceding and 1 preceding) from over10k limit 100; +select ts, f, sum(f) over (partition by ts order by f rows between 1 following and 2 following) from over10k limit 100; +select ts, f, sum(f) over (partition by ts order by f rows between unbounded preceding and 1 following) from over10k limit 100; + http://git-wip-us.apache.org/repos/asf/hive/blob/ad62e2ed/ql/src/test/results/clientpositive/windowing_windowspec.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientpositive/windowing_windowspec.q.out b/ql/src/test/results/clientpositive/windowing_windowspec.q.out index 66b0b52..8d78c22 100644 --- a/ql/src/test/results/clientpositive/windowing_windowspec.q.out +++ b/ql/src/test/results/clientpositive/windowing_windowspec.q.out @@ -800,114 +800,6 @@ POSTHOOK: Input: default@over10k 71.68 722.6499947607517 79.46 802.1099938452244 80.02 882.1299904882908 -PREHOOK: query: select f, sum(f) over (partition by ts order by f rows between 2 preceding and 1 preceding) from over10k limit 100 -PREHOOK: type: QUERY -PREHOOK: Input: default@over10k -#### A masked pattern was here #### -POSTHOOK: query: select f, sum(f) over (partition by ts order by f rows between 2 preceding and 1 preceding) from over10k limit 100 -POSTHOOK: type: QUERY -POSTHOOK: Input: default@over10k -#### A masked pattern was here #### -3.17 14.0600004196167 -10.89 28.600000381469727 -14.54 43.38000011444092 -14.78 58.0600004196167 -17.85 67.78000068664551 -20.61 81.9300012588501 -28.69 96.3700008392334 -29.22 109.69000053405762 -31.17 127.42999839782715 -38.35 137.3499984741211 -38.61 147.60999870300293 -39.48 156.97999954223633 -40.54 160.22999954223633 -41.6 167.70000076293945 -46.08 182.5800018310547 -54.36 198.97999954223633 -56.94 222.3400001525879 -64.96 249.7799949645996 -73.52 273.99999618530273 -78.58 298.4700012207031 -81.41 318.2200012207031 -84.71 332.1300048828125 -87.43 344.9100036621094 -91.36 356.45999908447266 -92.96 366.79000091552734 -95.04 279.36000061035156 -0.83 2.8199999928474426 -1.99 6.550000011920929 -3.73 15.409999668598175 -8.86 25.199999570846558 -10.62 34.52999925613403 -11.32 43.6299991607666 -12.83 49.46999931335449 -14.7 53.80999946594238 -14.96 60.06999969482422 -17.58 66.34000015258789 -19.1 72.65000057220459 -21.01 84.64000129699707 -26.95 94.29000091552734 -27.23 104.26000022888184 -29.07 112.95999908447266 -29.71 117.8499984741211 -31.84 122.55999946594238 -31.94 128.80999946594238 -35.32 136.42000007629395 -37.32 143.07999992370605 -38.5 153.22000122070312 -42.08 162.20000076293945 -44.3 169.54000091552734 -44.66 177.88000106811523 -46.84 184.68999862670898 -48.89 190.02999877929688 -49.64 195.64999771118164 -50.28 200.89999771118164 -52.09 205.2699966430664 -53.26 209.71999740600586 -54.09 215.88999938964844 -56.45 220.55999755859375 -56.76 228.70999908447266 -61.41 236.5 -61.88 243.07999801635742 -63.03 250.87000274658203 -64.55 258.08000564575195 -68.62 272.3300018310547 -76.13 288.3500061035156 -79.05 304.2300033569336 -80.43 317.02000427246094 -81.41 323.74000549316406 -82.85 328.67000579833984 -83.98 332.4500045776367 -84.21 336.59000396728516 -85.55 341.67000579833984 -87.93 346.62000274658203 -88.93 356.6800003051758 -94.27 370.57999420166016 -99.45 282.6499938964844 -0.36 0.8400000035762787 -0.48 1.6300000250339508 -0.79 2.9000000059604645 -1.27 7.020000010728836 -4.48 15.540000021457672 -9.0 38.02000045776367 -23.27 61.87999963760376 -25.13 82.73999977111816 -25.34 99.64999961853027 -25.91 105.38999938964844 -29.01 110.72999954223633 -30.47 123.34000015258789 -37.95 136.72999954223633 -39.3 153.6299991607666 -45.91 175.5999984741211 -52.44 191.74999618530273 -54.1 209.14999771118164 -56.7 222.0099983215332 -58.77 231.6599998474121 -62.09 245.7599983215332 -68.2 260.73999786376953 -71.68 281.4299964904785 -79.46 299.35999298095703 -80.02 312.4499969482422 PREHOOK: query: select s, i, round(avg(d) over (partition by s order by i) / 10.0 , 2) from over10k limit 7 PREHOOK: type: QUERY PREHOOK: Input: default@over10k http://git-wip-us.apache.org/repos/asf/hive/blob/ad62e2ed/ql/src/test/results/clientpositive/windowing_windowspec2.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientpositive/windowing_windowspec2.q.out b/ql/src/test/results/clientpositive/windowing_windowspec2.q.out new file mode 100644 index 0000000..0879344 --- /dev/null +++ b/ql/src/test/results/clientpositive/windowing_windowspec2.q.out @@ -0,0 +1,478 @@ +PREHOOK: query: drop table over10k +PREHOOK: type: DROPTABLE +POSTHOOK: query: drop table over10k +POSTHOOK: type: DROPTABLE +PREHOOK: query: create table over10k( + t tinyint, + si smallint, + i int, + b bigint, + f float, + d double, + bo boolean, + s string, + ts timestamp, + dec decimal, + bin binary) + row format delimited + fields terminated by '|' +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@over10k +POSTHOOK: query: create table over10k( + t tinyint, + si smallint, + i int, + b bigint, + f float, + d double, + bo boolean, + s string, + ts timestamp, + dec decimal, + bin binary) + row format delimited + fields terminated by '|' +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@over10k +PREHOOK: query: load data local inpath '../../data/files/over10k' into table over10k +PREHOOK: type: LOAD +#### A masked pattern was here #### +PREHOOK: Output: default@over10k +POSTHOOK: query: load data local inpath '../../data/files/over10k' into table over10k +POSTHOOK: type: LOAD +#### A masked pattern was here #### +POSTHOOK: Output: default@over10k +PREHOOK: query: select ts, f, sum(f) over (partition by ts order by f rows between 2 preceding and 1 preceding) from over10k limit 100 +PREHOOK: type: QUERY +PREHOOK: Input: default@over10k +#### A masked pattern was here #### +POSTHOOK: query: select ts, f, sum(f) over (partition by ts order by f rows between 2 preceding and 1 preceding) from over10k limit 100 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@over10k +#### A masked pattern was here #### +2013-03-01 09:11:58.70307 3.17 NULL +2013-03-01 09:11:58.70307 10.89 3.1700000762939453 +2013-03-01 09:11:58.70307 14.54 14.0600004196167 +2013-03-01 09:11:58.70307 14.78 25.43000030517578 +2013-03-01 09:11:58.70307 17.85 29.31999969482422 +2013-03-01 09:11:58.70307 20.61 32.63000011444092 +2013-03-01 09:11:58.70307 28.69 38.46000099182129 +2013-03-01 09:11:58.70307 29.22 49.30000114440918 +2013-03-01 09:11:58.70307 31.17 57.90999984741211 +2013-03-01 09:11:58.70307 38.35 60.38999938964844 +2013-03-01 09:11:58.70307 38.61 69.51999855041504 +2013-03-01 09:11:58.70307 39.48 76.95999908447266 +2013-03-01 09:11:58.70307 40.54 78.09000015258789 +2013-03-01 09:11:58.70307 41.6 80.02000045776367 +2013-03-01 09:11:58.70307 46.08 82.13999938964844 +2013-03-01 09:11:58.70307 54.36 87.68000030517578 +2013-03-01 09:11:58.70307 56.94 100.44000244140625 +2013-03-01 09:11:58.70307 64.96 111.29999923706055 +2013-03-01 09:11:58.70307 73.52 121.89999771118164 +2013-03-01 09:11:58.70307 78.58 138.47999572753906 +2013-03-01 09:11:58.70307 81.41 152.0999984741211 +2013-03-01 09:11:58.70307 84.71 159.99000549316406 +2013-03-01 09:11:58.70307 87.43 166.12000274658203 +2013-03-01 09:11:58.70307 91.36 172.13999938964844 +2013-03-01 09:11:58.70307 92.96 178.79000091552734 +2013-03-01 09:11:58.70307 95.04 184.31999969482422 +2013-03-01 09:11:58.703071 0.83 NULL +2013-03-01 09:11:58.703071 1.99 0.8299999833106995 +2013-03-01 09:11:58.703071 3.73 2.8199999928474426 +2013-03-01 09:11:58.703071 8.86 5.7200000286102295 +2013-03-01 09:11:58.703071 10.62 12.589999675750732 +2013-03-01 09:11:58.703071 11.32 19.479999542236328 +2013-03-01 09:11:58.703071 12.83 21.9399995803833 +2013-03-01 09:11:58.703071 14.7 24.149999618530273 +2013-03-01 09:11:58.703071 14.96 27.52999973297119 +2013-03-01 09:11:58.703071 17.58 29.65999984741211 +2013-03-01 09:11:58.703071 19.1 32.53999996185303 +2013-03-01 09:11:58.703071 21.01 36.68000030517578 +2013-03-01 09:11:58.703071 26.95 40.11000061035156 +2013-03-01 09:11:58.703071 27.23 47.96000099182129 +2013-03-01 09:11:58.703071 29.07 54.18000030517578 +2013-03-01 09:11:58.703071 29.71 56.29999923706055 +2013-03-01 09:11:58.703071 31.84 58.779998779296875 +2013-03-01 09:11:58.703071 31.94 61.54999923706055 +2013-03-01 09:11:58.703071 35.32 63.78000068664551 +2013-03-01 09:11:58.703071 37.32 67.26000022888184 +2013-03-01 09:11:58.703071 38.5 72.63999938964844 +2013-03-01 09:11:58.703071 42.08 75.81999969482422 +2013-03-01 09:11:58.703071 44.3 80.58000183105469 +2013-03-01 09:11:58.703071 44.66 86.38000106811523 +2013-03-01 09:11:58.703071 46.84 88.95999908447266 +2013-03-01 09:11:58.703071 48.89 91.5 +2013-03-01 09:11:58.703071 49.64 95.72999954223633 +2013-03-01 09:11:58.703071 50.28 98.52999877929688 +2013-03-01 09:11:58.703071 52.09 99.91999816894531 +2013-03-01 09:11:58.703071 53.26 102.36999893188477 +2013-03-01 09:11:58.703071 54.09 105.3499984741211 +2013-03-01 09:11:58.703071 56.45 107.3499984741211 +2013-03-01 09:11:58.703071 56.76 110.54000091552734 +2013-03-01 09:11:58.703071 61.41 113.20999908447266 +2013-03-01 09:11:58.703071 61.88 118.16999816894531 +2013-03-01 09:11:58.703071 63.03 123.29000091552734 +2013-03-01 09:11:58.703071 64.55 124.90999984741211 +2013-03-01 09:11:58.703071 68.62 127.58000183105469 +2013-03-01 09:11:58.703071 76.13 133.17000579833984 +2013-03-01 09:11:58.703071 79.05 144.75 +2013-03-01 09:11:58.703071 80.43 155.18000030517578 +2013-03-01 09:11:58.703071 81.41 159.4800033569336 +2013-03-01 09:11:58.703071 82.85 161.84000396728516 +2013-03-01 09:11:58.703071 83.98 164.26000213623047 +2013-03-01 09:11:58.703071 84.21 166.8300018310547 +2013-03-01 09:11:58.703071 85.55 168.19000244140625 +2013-03-01 09:11:58.703071 87.93 169.76000213623047 +2013-03-01 09:11:58.703071 88.93 173.4800033569336 +2013-03-01 09:11:58.703071 94.27 176.86000061035156 +2013-03-01 09:11:58.703071 99.45 183.1999969482422 +2013-03-01 09:11:58.703072 0.36 NULL +2013-03-01 09:11:58.703072 0.48 0.36000001430511475 +2013-03-01 09:11:58.703072 0.79 0.8400000035762787 +2013-03-01 09:11:58.703072 1.27 1.270000010728836 +2013-03-01 09:11:58.703072 4.48 2.060000002384186 +2013-03-01 09:11:58.703072 9.0 5.75 +2013-03-01 09:11:58.703072 23.27 13.480000019073486 +2013-03-01 09:11:58.703072 25.13 32.27000045776367 +2013-03-01 09:11:58.703072 25.34 48.39999961853027 +2013-03-01 09:11:58.703072 25.91 50.46999931335449 +2013-03-01 09:11:58.703072 29.01 51.25 +2013-03-01 09:11:58.703072 30.47 54.920000076293945 +2013-03-01 09:11:58.703072 37.95 59.47999954223633 +2013-03-01 09:11:58.703072 39.3 68.42000007629395 +2013-03-01 09:11:58.703072 45.91 77.25 +2013-03-01 09:11:58.703072 52.44 85.20999908447266 +2013-03-01 09:11:58.703072 54.1 98.3499984741211 +2013-03-01 09:11:58.703072 56.7 106.53999710083008 +2013-03-01 09:11:58.703072 58.77 110.79999923706055 +2013-03-01 09:11:58.703072 62.09 115.47000122070312 +2013-03-01 09:11:58.703072 68.2 120.86000061035156 +2013-03-01 09:11:58.703072 71.68 130.28999710083008 +2013-03-01 09:11:58.703072 79.46 139.87999725341797 +2013-03-01 09:11:58.703072 80.02 151.13999938964844 +PREHOOK: query: select ts, f, sum(f) over (partition by ts order by f rows between unbounded preceding and 1 preceding) from over10k limit 100 +PREHOOK: type: QUERY +PREHOOK: Input: default@over10k +#### A masked pattern was here #### +POSTHOOK: query: select ts, f, sum(f) over (partition by ts order by f rows between unbounded preceding and 1 preceding) from over10k limit 100 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@over10k +#### A masked pattern was here #### +2013-03-01 09:11:58.70307 3.17 NULL +2013-03-01 09:11:58.70307 10.89 3.1700000762939453 +2013-03-01 09:11:58.70307 14.54 14.0600004196167 +2013-03-01 09:11:58.70307 14.78 28.600000381469727 +2013-03-01 09:11:58.70307 17.85 43.38000011444092 +2013-03-01 09:11:58.70307 20.61 61.230000495910645 +2013-03-01 09:11:58.70307 28.69 81.8400011062622 +2013-03-01 09:11:58.70307 29.22 110.53000164031982 +2013-03-01 09:11:58.70307 31.17 139.75000095367432 +2013-03-01 09:11:58.70307 38.35 170.92000102996826 +2013-03-01 09:11:58.70307 38.61 209.26999950408936 +2013-03-01 09:11:58.70307 39.48 247.88000011444092 +2013-03-01 09:11:58.70307 40.54 287.35999965667725 +2013-03-01 09:11:58.70307 41.6 327.9000005722046 +2013-03-01 09:11:58.70307 46.08 369.4999990463257 +2013-03-01 09:11:58.70307 54.36 415.58000087738037 +2013-03-01 09:11:58.70307 56.94 469.94000148773193 +2013-03-01 09:11:58.70307 64.96 526.8800001144409 +2013-03-01 09:11:58.70307 73.52 591.8399991989136 +2013-03-01 09:11:58.70307 78.58 665.35999584198 +2013-03-01 09:11:58.70307 81.41 743.9399976730347 +2013-03-01 09:11:58.70307 84.71 825.350001335144 +2013-03-01 09:11:58.70307 87.43 910.0600004196167 +2013-03-01 09:11:58.70307 91.36 997.4900007247925 +2013-03-01 09:11:58.70307 92.96 1088.850001335144 +2013-03-01 09:11:58.70307 95.04 1181.8100004196167 +2013-03-01 09:11:58.703071 0.83 NULL +2013-03-01 09:11:58.703071 1.99 0.8299999833106995 +2013-03-01 09:11:58.703071 3.73 2.8199999928474426 +2013-03-01 09:11:58.703071 8.86 6.550000011920929 +2013-03-01 09:11:58.703071 10.62 15.409999668598175 +2013-03-01 09:11:58.703071 11.32 26.029999554157257 +2013-03-01 09:11:58.703071 12.83 37.349999248981476 +2013-03-01 09:11:58.703071 14.7 50.17999917268753 +2013-03-01 09:11:58.703071 14.96 64.87999898195267 +2013-03-01 09:11:58.703071 17.58 79.83999902009964 +2013-03-01 09:11:58.703071 19.1 97.4199989438057 +2013-03-01 09:11:58.703071 21.01 116.51999932527542 +2013-03-01 09:11:58.703071 26.95 137.52999955415726 +2013-03-01 09:11:58.703071 27.23 164.4800003170967 +2013-03-01 09:11:58.703071 29.07 191.70999985933304 +2013-03-01 09:11:58.703071 29.71 220.77999955415726 +2013-03-01 09:11:58.703071 31.84 250.4899986386299 +2013-03-01 09:11:58.703071 31.94 282.3299987912178 +2013-03-01 09:11:58.703071 35.32 314.2699993252754 +2013-03-01 09:11:58.703071 37.32 349.58999902009964 +2013-03-01 09:11:58.703071 38.5 386.90999871492386 +2013-03-01 09:11:58.703071 42.08 425.40999871492386 +2013-03-01 09:11:58.703071 44.3 467.49000054597855 +2013-03-01 09:11:58.703071 44.66 511.7899997830391 +2013-03-01 09:11:58.703071 46.84 556.4499996304512 +2013-03-01 09:11:58.703071 48.89 603.2899997830391 +2013-03-01 09:11:58.703071 49.64 652.1799991726875 +2013-03-01 09:11:58.703071 50.28 701.819998562336 +2013-03-01 09:11:58.703071 52.09 752.0999973416328 +2013-03-01 09:11:58.703071 53.26 804.1899974942207 +2013-03-01 09:11:58.703071 54.09 857.4499958157539 +2013-03-01 09:11:58.703071 56.45 911.5399959683418 +2013-03-01 09:11:58.703071 56.76 967.9899967312813 +2013-03-01 09:11:58.703071 61.41 1024.7499950528145 +2013-03-01 09:11:58.703071 61.88 1086.1599949002266 +2013-03-01 09:11:58.703071 63.03 1148.0399959683418 +2013-03-01 09:11:58.703071 64.55 1211.0699947476387 +2013-03-01 09:11:58.703071 68.62 1275.6199977993965 +2013-03-01 09:11:58.703071 76.13 1344.2400005459785 +2013-03-01 09:11:58.703071 79.05 1420.3699977993965 +2013-03-01 09:11:58.703071 80.43 1499.4200008511543 +2013-03-01 09:11:58.703071 81.41 1579.85000115633 +2013-03-01 09:11:58.703071 82.85 1661.2600048184395 +2013-03-01 09:11:58.703071 83.98 1744.1100032925606 +2013-03-01 09:11:58.703071 84.21 1828.0900066494942 +2013-03-01 09:11:58.703071 85.55 1912.3000057339668 +2013-03-01 09:11:58.703071 87.93 1997.8500087857246 +2013-03-01 09:11:58.703071 88.93 2085.7800090909004 +2013-03-01 09:11:58.703071 94.27 2174.710009396076 +2013-03-01 09:11:58.703071 99.45 2268.9800060391426 +2013-03-01 09:11:58.703072 0.36 NULL +2013-03-01 09:11:58.703072 0.48 0.36000001430511475 +2013-03-01 09:11:58.703072 0.79 0.8400000035762787 +2013-03-01 09:11:58.703072 1.27 1.6300000250339508 +2013-03-01 09:11:58.703072 4.48 2.9000000059604645 +2013-03-01 09:11:58.703072 9.0 7.380000025033951 +2013-03-01 09:11:58.703072 23.27 16.38000002503395 +2013-03-01 09:11:58.703072 25.13 39.65000048279762 +2013-03-01 09:11:58.703072 25.34 64.77999964356422 +2013-03-01 09:11:58.703072 25.91 90.11999979615211 +2013-03-01 09:11:58.703072 29.01 116.02999964356422 +2013-03-01 09:11:58.703072 30.47 145.03999987244606 +2013-03-01 09:11:58.703072 37.95 175.50999918580055 +2013-03-01 09:11:58.703072 39.3 213.45999994874 +2013-03-01 09:11:58.703072 45.91 252.75999918580055 +2013-03-01 09:11:58.703072 52.44 298.66999903321266 +2013-03-01 09:11:58.703072 54.1 351.10999765992165 +2013-03-01 09:11:58.703072 56.7 405.20999613404274 +2013-03-01 09:11:58.703072 58.77 461.9099968969822 +2013-03-01 09:11:58.703072 62.09 520.6799973547459 +2013-03-01 09:11:58.703072 68.2 582.7699975073338 +2013-03-01 09:11:58.703072 71.68 650.9699944555759 +2013-03-01 09:11:58.703072 79.46 722.6499947607517 +2013-03-01 09:11:58.703072 80.02 802.1099938452244 +PREHOOK: query: select ts, f, sum(f) over (partition by ts order by f rows between 1 following and 2 following) from over10k limit 100 +PREHOOK: type: QUERY +PREHOOK: Input: default@over10k +#### A masked pattern was here #### +POSTHOOK: query: select ts, f, sum(f) over (partition by ts order by f rows between 1 following and 2 following) from over10k limit 100 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@over10k +#### A masked pattern was here #### +2013-03-01 09:11:58.70307 3.17 25.43000030517578 +2013-03-01 09:11:58.70307 10.89 29.31999969482422 +2013-03-01 09:11:58.70307 14.54 32.63000011444092 +2013-03-01 09:11:58.70307 14.78 38.46000099182129 +2013-03-01 09:11:58.70307 17.85 49.30000114440918 +2013-03-01 09:11:58.70307 20.61 57.90999984741211 +2013-03-01 09:11:58.70307 28.69 60.38999938964844 +2013-03-01 09:11:58.70307 29.22 69.51999855041504 +2013-03-01 09:11:58.70307 31.17 76.95999908447266 +2013-03-01 09:11:58.70307 38.35 78.09000015258789 +2013-03-01 09:11:58.70307 38.61 80.02000045776367 +2013-03-01 09:11:58.70307 39.48 82.13999938964844 +2013-03-01 09:11:58.70307 40.54 87.68000030517578 +2013-03-01 09:11:58.70307 41.6 100.44000244140625 +2013-03-01 09:11:58.70307 46.08 111.29999923706055 +2013-03-01 09:11:58.70307 54.36 121.89999771118164 +2013-03-01 09:11:58.70307 56.94 138.47999572753906 +2013-03-01 09:11:58.70307 64.96 152.0999984741211 +2013-03-01 09:11:58.70307 73.52 159.99000549316406 +2013-03-01 09:11:58.70307 78.58 166.12000274658203 +2013-03-01 09:11:58.70307 81.41 172.13999938964844 +2013-03-01 09:11:58.70307 84.71 178.79000091552734 +2013-03-01 09:11:58.70307 87.43 184.31999969482422 +2013-03-01 09:11:58.70307 91.36 188.0 +2013-03-01 09:11:58.70307 92.96 95.04000091552734 +2013-03-01 09:11:58.70307 95.04 NULL +2013-03-01 09:11:58.703071 0.83 5.7200000286102295 +2013-03-01 09:11:58.703071 1.99 12.589999675750732 +2013-03-01 09:11:58.703071 3.73 19.479999542236328 +2013-03-01 09:11:58.703071 8.86 21.9399995803833 +2013-03-01 09:11:58.703071 10.62 24.149999618530273 +2013-03-01 09:11:58.703071 11.32 27.52999973297119 +2013-03-01 09:11:58.703071 12.83 29.65999984741211 +2013-03-01 09:11:58.703071 14.7 32.53999996185303 +2013-03-01 09:11:58.703071 14.96 36.68000030517578 +2013-03-01 09:11:58.703071 17.58 40.11000061035156 +2013-03-01 09:11:58.703071 19.1 47.96000099182129 +2013-03-01 09:11:58.703071 21.01 54.18000030517578 +2013-03-01 09:11:58.703071 26.95 56.29999923706055 +2013-03-01 09:11:58.703071 27.23 58.779998779296875 +2013-03-01 09:11:58.703071 29.07 61.54999923706055 +2013-03-01 09:11:58.703071 29.71 63.78000068664551 +2013-03-01 09:11:58.703071 31.84 67.26000022888184 +2013-03-01 09:11:58.703071 31.94 72.63999938964844 +2013-03-01 09:11:58.703071 35.32 75.81999969482422 +2013-03-01 09:11:58.703071 37.32 80.58000183105469 +2013-03-01 09:11:58.703071 38.5 86.38000106811523 +2013-03-01 09:11:58.703071 42.08 88.95999908447266 +2013-03-01 09:11:58.703071 44.3 91.5 +2013-03-01 09:11:58.703071 44.66 95.72999954223633 +2013-03-01 09:11:58.703071 46.84 98.52999877929688 +2013-03-01 09:11:58.703071 48.89 99.91999816894531 +2013-03-01 09:11:58.703071 49.64 102.36999893188477 +2013-03-01 09:11:58.703071 50.28 105.3499984741211 +2013-03-01 09:11:58.703071 52.09 107.3499984741211 +2013-03-01 09:11:58.703071 53.26 110.54000091552734 +2013-03-01 09:11:58.703071 54.09 113.20999908447266 +2013-03-01 09:11:58.703071 56.45 118.16999816894531 +2013-03-01 09:11:58.703071 56.76 123.29000091552734 +2013-03-01 09:11:58.703071 61.41 124.90999984741211 +2013-03-01 09:11:58.703071 61.88 127.58000183105469 +2013-03-01 09:11:58.703071 63.03 133.17000579833984 +2013-03-01 09:11:58.703071 64.55 144.75 +2013-03-01 09:11:58.703071 68.62 155.18000030517578 +2013-03-01 09:11:58.703071 76.13 159.4800033569336 +2013-03-01 09:11:58.703071 79.05 161.84000396728516 +2013-03-01 09:11:58.703071 80.43 164.26000213623047 +2013-03-01 09:11:58.703071 81.41 166.8300018310547 +2013-03-01 09:11:58.703071 82.85 168.19000244140625 +2013-03-01 09:11:58.703071 83.98 169.76000213623047 +2013-03-01 09:11:58.703071 84.21 173.4800033569336 +2013-03-01 09:11:58.703071 85.55 176.86000061035156 +2013-03-01 09:11:58.703071 87.93 183.1999969482422 +2013-03-01 09:11:58.703071 88.93 193.7199935913086 +2013-03-01 09:11:58.703071 94.27 99.44999694824219 +2013-03-01 09:11:58.703071 99.45 NULL +2013-03-01 09:11:58.703072 0.36 1.270000010728836 +2013-03-01 09:11:58.703072 0.48 2.060000002384186 +2013-03-01 09:11:58.703072 0.79 5.75 +2013-03-01 09:11:58.703072 1.27 13.480000019073486 +2013-03-01 09:11:58.703072 4.48 32.27000045776367 +2013-03-01 09:11:58.703072 9.0 48.39999961853027 +2013-03-01 09:11:58.703072 23.27 50.46999931335449 +2013-03-01 09:11:58.703072 25.13 51.25 +2013-03-01 09:11:58.703072 25.34 54.920000076293945 +2013-03-01 09:11:58.703072 25.91 59.47999954223633 +2013-03-01 09:11:58.703072 29.01 68.42000007629395 +2013-03-01 09:11:58.703072 30.47 77.25 +2013-03-01 09:11:58.703072 37.95 85.20999908447266 +2013-03-01 09:11:58.703072 39.3 98.3499984741211 +2013-03-01 09:11:58.703072 45.91 106.53999710083008 +2013-03-01 09:11:58.703072 52.44 110.79999923706055 +2013-03-01 09:11:58.703072 54.1 115.47000122070312 +2013-03-01 09:11:58.703072 56.7 120.86000061035156 +2013-03-01 09:11:58.703072 58.77 130.28999710083008 +2013-03-01 09:11:58.703072 62.09 139.87999725341797 +2013-03-01 09:11:58.703072 68.2 151.13999938964844 +2013-03-01 09:11:58.703072 71.68 159.47999572753906 +2013-03-01 09:11:58.703072 79.46 161.30999755859375 +2013-03-01 09:11:58.703072 80.02 168.27000427246094 +PREHOOK: query: select ts, f, sum(f) over (partition by ts order by f rows between unbounded preceding and 1 following) from over10k limit 100 +PREHOOK: type: QUERY +PREHOOK: Input: default@over10k +#### A masked pattern was here #### +POSTHOOK: query: select ts, f, sum(f) over (partition by ts order by f rows between unbounded preceding and 1 following) from over10k limit 100 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@over10k +#### A masked pattern was here #### +2013-03-01 09:11:58.70307 3.17 14.0600004196167 +2013-03-01 09:11:58.70307 10.89 28.600000381469727 +2013-03-01 09:11:58.70307 14.54 43.38000011444092 +2013-03-01 09:11:58.70307 14.78 61.230000495910645 +2013-03-01 09:11:58.70307 17.85 81.8400011062622 +2013-03-01 09:11:58.70307 20.61 110.53000164031982 +2013-03-01 09:11:58.70307 28.69 139.75000095367432 +2013-03-01 09:11:58.70307 29.22 170.92000102996826 +2013-03-01 09:11:58.70307 31.17 209.26999950408936 +2013-03-01 09:11:58.70307 38.35 247.88000011444092 +2013-03-01 09:11:58.70307 38.61 287.35999965667725 +2013-03-01 09:11:58.70307 39.48 327.9000005722046 +2013-03-01 09:11:58.70307 40.54 369.4999990463257 +2013-03-01 09:11:58.70307 41.6 415.58000087738037 +2013-03-01 09:11:58.70307 46.08 469.94000148773193 +2013-03-01 09:11:58.70307 54.36 526.8800001144409 +2013-03-01 09:11:58.70307 56.94 591.8399991989136 +2013-03-01 09:11:58.70307 64.96 665.35999584198 +2013-03-01 09:11:58.70307 73.52 743.9399976730347 +2013-03-01 09:11:58.70307 78.58 825.350001335144 +2013-03-01 09:11:58.70307 81.41 910.0600004196167 +2013-03-01 09:11:58.70307 84.71 997.4900007247925 +2013-03-01 09:11:58.70307 87.43 1088.850001335144 +2013-03-01 09:11:58.70307 91.36 1181.8100004196167 +2013-03-01 09:11:58.70307 92.96 1276.850001335144 +2013-03-01 09:11:58.70307 95.04 1276.850001335144 +2013-03-01 09:11:58.703071 0.83 2.8199999928474426 +2013-03-01 09:11:58.703071 1.99 6.550000011920929 +2013-03-01 09:11:58.703071 3.73 15.409999668598175 +2013-03-01 09:11:58.703071 8.86 26.029999554157257 +2013-03-01 09:11:58.703071 10.62 37.349999248981476 +2013-03-01 09:11:58.703071 11.32 50.17999917268753 +2013-03-01 09:11:58.703071 12.83 64.87999898195267 +2013-03-01 09:11:58.703071 14.7 79.83999902009964 +2013-03-01 09:11:58.703071 14.96 97.4199989438057 +2013-03-01 09:11:58.703071 17.58 116.51999932527542 +2013-03-01 09:11:58.703071 19.1 137.52999955415726 +2013-03-01 09:11:58.703071 21.01 164.4800003170967 +2013-03-01 09:11:58.703071 26.95 191.70999985933304 +2013-03-01 09:11:58.703071 27.23 220.77999955415726 +2013-03-01 09:11:58.703071 29.07 250.4899986386299 +2013-03-01 09:11:58.703071 29.71 282.3299987912178 +2013-03-01 09:11:58.703071 31.84 314.2699993252754 +2013-03-01 09:11:58.703071 31.94 349.58999902009964 +2013-03-01 09:11:58.703071 35.32 386.90999871492386 +2013-03-01 09:11:58.703071 37.32 425.40999871492386 +2013-03-01 09:11:58.703071 38.5 467.49000054597855 +2013-03-01 09:11:58.703071 42.08 511.7899997830391 +2013-03-01 09:11:58.703071 44.3 556.4499996304512 +2013-03-01 09:11:58.703071 44.66 603.2899997830391 +2013-03-01 09:11:58.703071 46.84 652.1799991726875 +2013-03-01 09:11:58.703071 48.89 701.819998562336 +2013-03-01 09:11:58.703071 49.64 752.0999973416328 +2013-03-01 09:11:58.703071 50.28 804.1899974942207 +2013-03-01 09:11:58.703071 52.09 857.4499958157539 +2013-03-01 09:11:58.703071 53.26 911.5399959683418 +2013-03-01 09:11:58.703071 54.09 967.9899967312813 +2013-03-01 09:11:58.703071 56.45 1024.7499950528145 +2013-03-01 09:11:58.703071 56.76 1086.1599949002266 +2013-03-01 09:11:58.703071 61.41 1148.0399959683418 +2013-03-01 09:11:58.703071 61.88 1211.0699947476387 +2013-03-01 09:11:58.703071 63.03 1275.6199977993965 +2013-03-01 09:11:58.703071 64.55 1344.2400005459785 +2013-03-01 09:11:58.703071 68.62 1420.3699977993965 +2013-03-01 09:11:58.703071 76.13 1499.4200008511543 +2013-03-01 09:11:58.703071 79.05 1579.85000115633 +2013-03-01 09:11:58.703071 80.43 1661.2600048184395 +2013-03-01 09:11:58.703071 81.41 1744.1100032925606 +2013-03-01 09:11:58.703071 82.85 1828.0900066494942 +2013-03-01 09:11:58.703071 83.98 1912.3000057339668 +2013-03-01 09:11:58.703071 84.21 1997.8500087857246 +2013-03-01 09:11:58.703071 85.55 2085.7800090909004 +2013-03-01 09:11:58.703071 87.93 2174.710009396076 +2013-03-01 09:11:58.703071 88.93 2268.9800060391426 +2013-03-01 09:11:58.703071 94.27 2368.430002987385 +2013-03-01 09:11:58.703071 99.45 2368.430002987385 +2013-03-01 09:11:58.703072 0.36 0.8400000035762787 +2013-03-01 09:11:58.703072 0.48 1.6300000250339508 +2013-03-01 09:11:58.703072 0.79 2.9000000059604645 +2013-03-01 09:11:58.703072 1.27 7.380000025033951 +2013-03-01 09:11:58.703072 4.48 16.38000002503395 +2013-03-01 09:11:58.703072 9.0 39.65000048279762 +2013-03-01 09:11:58.703072 23.27 64.77999964356422 +2013-03-01 09:11:58.703072 25.13 90.11999979615211 +2013-03-01 09:11:58.703072 25.34 116.02999964356422 +2013-03-01 09:11:58.703072 25.91 145.03999987244606 +2013-03-01 09:11:58.703072 29.01 175.50999918580055 +2013-03-01 09:11:58.703072 30.47 213.45999994874 +2013-03-01 09:11:58.703072 37.95 252.75999918580055 +2013-03-01 09:11:58.703072 39.3 298.66999903321266 +2013-03-01 09:11:58.703072 45.91 351.10999765992165 +2013-03-01 09:11:58.703072 52.44 405.20999613404274 +2013-03-01 09:11:58.703072 54.1 461.9099968969822 +2013-03-01 09:11:58.703072 56.7 520.6799973547459 +2013-03-01 09:11:58.703072 58.77 582.7699975073338 +2013-03-01 09:11:58.703072 62.09 650.9699944555759 +2013-03-01 09:11:58.703072 68.2 722.6499947607517 +2013-03-01 09:11:58.703072 71.68 802.1099938452244 +2013-03-01 09:11:58.703072 79.46 882.1299904882908 +2013-03-01 09:11:58.703072 80.02 963.4199914038181