drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amansi...@apache.org
Subject [1/2] drill git commit: DRILL-3536: Add support for LEAD, LAG, NTILE, FIRST_VALUE and LAST_VALUE window functions
Date Tue, 18 Aug 2015 17:05:11 GMT
Repository: drill
Updated Branches:
  refs/heads/master 6813b20e7 -> b55e2328d


http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/b4.p4.oby.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/b4.p4.oby.tsv b/exec/java-exec/src/test/resources/window/b4.p4.oby.tsv
index 528f2f3..2f8de7a 100644
--- a/exec/java-exec/src/test/resources/window/b4.p4.oby.tsv
+++ b/exec/java-exec/src/test/resources/window/b4.p4.oby.tsv
@@ -1,80 +1,80 @@
 1	11	1	1	1	0.0125	0.0
 3	35	2	2	2	0.0375	0.012658227848101266
 3	35	3	2	2	0.0375	0.012658227848101266
-10	126	4	4	3	0.125	0.0379746835443038
-10	126	5	4	3	0.125	0.0379746835443038
-10	126	6	4	3	0.125	0.0379746835443038
-10	126	7	4	3	0.125	0.0379746835443038
-10	126	8	4	3	0.125	0.0379746835443038
-10	126	9	4	3	0.125	0.0379746835443038
-10	126	10	4	3	0.125	0.0379746835443038
-14	182	11	11	4	0.175	0.12658227848101267
-14	182	12	11	4	0.175	0.12658227848101267
-14	182	13	11	4	0.175	0.12658227848101267
-14	182	14	11	4	0.175	0.12658227848101267
-19	257	15	15	5	0.2375	0.17721518987341772
-19	257	16	15	5	0.2375	0.17721518987341772
-19	257	17	15	5	0.2375	0.17721518987341772
-19	257	18	15	5	0.2375	0.17721518987341772
-19	257	19	15	5	0.2375	0.17721518987341772
-25	353	20	20	6	0.3125	0.24050632911392406
-25	353	21	20	6	0.3125	0.24050632911392406
-25	353	22	20	6	0.3125	0.24050632911392406
-25	353	23	20	6	0.3125	0.24050632911392406
-25	353	24	20	6	0.3125	0.24050632911392406
-25	353	25	20	6	0.3125	0.24050632911392406
-32	472	26	26	7	0.4	0.31645569620253167
-32	472	27	26	7	0.4	0.31645569620253167
-32	472	28	26	7	0.4	0.31645569620253167
-32	472	29	26	7	0.4	0.31645569620253167
-32	472	30	26	7	0.4	0.31645569620253167
-32	472	31	26	7	0.4	0.31645569620253167
-32	472	32	26	7	0.4	0.31645569620253167
-40	616	33	33	8	0.5	0.4050632911392405
-40	616	34	33	8	0.5	0.4050632911392405
-40	616	35	33	8	0.5	0.4050632911392405
-40	616	36	33	8	0.5	0.4050632911392405
-40	616	37	33	8	0.5	0.4050632911392405
-40	616	38	33	8	0.5	0.4050632911392405
-40	616	39	33	8	0.5	0.4050632911392405
-40	616	40	33	8	0.5	0.4050632911392405
-49	787	41	41	9	0.6125	0.5063291139240507
-49	787	42	41	9	0.6125	0.5063291139240507
-49	787	43	41	9	0.6125	0.5063291139240507
-49	787	44	41	9	0.6125	0.5063291139240507
-49	787	45	41	9	0.6125	0.5063291139240507
-49	787	46	41	9	0.6125	0.5063291139240507
-49	787	47	41	9	0.6125	0.5063291139240507
-49	787	48	41	9	0.6125	0.5063291139240507
-49	787	49	41	9	0.6125	0.5063291139240507
-60	1007	50	50	10	0.75	0.620253164556962
-60	1007	51	50	10	0.75	0.620253164556962
-60	1007	52	50	10	0.75	0.620253164556962
-60	1007	53	50	10	0.75	0.620253164556962
-60	1007	54	50	10	0.75	0.620253164556962
-60	1007	55	50	10	0.75	0.620253164556962
-60	1007	56	50	10	0.75	0.620253164556962
-60	1007	57	50	10	0.75	0.620253164556962
-60	1007	58	50	10	0.75	0.620253164556962
-60	1007	59	50	10	0.75	0.620253164556962
-60	1007	60	50	10	0.75	0.620253164556962
-71	1238	61	61	11	0.8875	0.759493670886076
-71	1238	62	61	11	0.8875	0.759493670886076
-71	1238	63	61	11	0.8875	0.759493670886076
-71	1238	64	61	11	0.8875	0.759493670886076
-71	1238	65	61	11	0.8875	0.759493670886076
-71	1238	66	61	11	0.8875	0.759493670886076
-71	1238	67	61	11	0.8875	0.759493670886076
-71	1238	68	61	11	0.8875	0.759493670886076
-71	1238	69	61	11	0.8875	0.759493670886076
-71	1238	70	61	11	0.8875	0.759493670886076
-71	1238	71	61	11	0.8875	0.759493670886076
-80	1436	72	72	12	1.0	0.8987341772151899
-80	1436	73	72	12	1.0	0.8987341772151899
-80	1436	74	72	12	1.0	0.8987341772151899
-80	1436	75	72	12	1.0	0.8987341772151899
-80	1436	76	72	12	1.0	0.8987341772151899
-80	1436	77	72	12	1.0	0.8987341772151899
-80	1436	78	72	12	1.0	0.8987341772151899
-80	1436	79	72	12	1.0	0.8987341772151899
-80	1436	80	72	12	1.0	0.8987341772151899
+13	165	4	4	3	0.1625	0.0379746835443038
+13	165	5	4	3	0.1625	0.0379746835443038
+13	165	6	4	3	0.1625	0.0379746835443038
+13	165	7	4	3	0.1625	0.0379746835443038
+13	165	8	4	3	0.1625	0.0379746835443038
+13	165	9	4	3	0.1625	0.0379746835443038
+13	165	10	4	3	0.1625	0.0379746835443038
+13	165	11	4	3	0.1625	0.0379746835443038
+13	165	12	4	3	0.1625	0.0379746835443038
+13	165	13	4	3	0.1625	0.0379746835443038
+17	221	14	14	4	0.2125	0.16455696202531644
+17	221	15	14	4	0.2125	0.16455696202531644
+17	221	16	14	4	0.2125	0.16455696202531644
+17	221	17	14	4	0.2125	0.16455696202531644
+22	296	18	18	5	0.275	0.21518987341772153
+22	296	19	18	5	0.275	0.21518987341772153
+22	296	20	18	5	0.275	0.21518987341772153
+22	296	21	18	5	0.275	0.21518987341772153
+22	296	22	18	5	0.275	0.21518987341772153
+28	392	23	23	6	0.35	0.27848101265822783
+28	392	24	23	6	0.35	0.27848101265822783
+28	392	25	23	6	0.35	0.27848101265822783
+28	392	26	23	6	0.35	0.27848101265822783
+28	392	27	23	6	0.35	0.27848101265822783
+28	392	28	23	6	0.35	0.27848101265822783
+35	511	29	29	7	0.4375	0.35443037974683544
+35	511	30	29	7	0.4375	0.35443037974683544
+35	511	31	29	7	0.4375	0.35443037974683544
+35	511	32	29	7	0.4375	0.35443037974683544
+35	511	33	29	7	0.4375	0.35443037974683544
+35	511	34	29	7	0.4375	0.35443037974683544
+35	511	35	29	7	0.4375	0.35443037974683544
+48	745	36	36	8	0.6	0.4430379746835443
+48	745	37	36	8	0.6	0.4430379746835443
+48	745	38	36	8	0.6	0.4430379746835443
+48	745	39	36	8	0.6	0.4430379746835443
+48	745	40	36	8	0.6	0.4430379746835443
+48	745	41	36	8	0.6	0.4430379746835443
+48	745	42	36	8	0.6	0.4430379746835443
+48	745	43	36	8	0.6	0.4430379746835443
+48	745	44	36	8	0.6	0.4430379746835443
+48	745	45	36	8	0.6	0.4430379746835443
+48	745	46	36	8	0.6	0.4430379746835443
+48	745	47	36	8	0.6	0.4430379746835443
+48	745	48	36	8	0.6	0.4430379746835443
+57	916	49	49	9	0.7125	0.6075949367088608
+57	916	50	49	9	0.7125	0.6075949367088608
+57	916	51	49	9	0.7125	0.6075949367088608
+57	916	52	49	9	0.7125	0.6075949367088608
+57	916	53	49	9	0.7125	0.6075949367088608
+57	916	54	49	9	0.7125	0.6075949367088608
+57	916	55	49	9	0.7125	0.6075949367088608
+57	916	56	49	9	0.7125	0.6075949367088608
+57	916	57	49	9	0.7125	0.6075949367088608
+70	1176	58	58	10	0.875	0.7215189873417721
+70	1176	59	58	10	0.875	0.7215189873417721
+70	1176	60	58	10	0.875	0.7215189873417721
+70	1176	61	58	10	0.875	0.7215189873417721
+70	1176	62	58	10	0.875	0.7215189873417721
+70	1176	63	58	10	0.875	0.7215189873417721
+70	1176	64	58	10	0.875	0.7215189873417721
+70	1176	65	58	10	0.875	0.7215189873417721
+70	1176	66	58	10	0.875	0.7215189873417721
+70	1176	67	58	10	0.875	0.7215189873417721
+70	1176	68	58	10	0.875	0.7215189873417721
+70	1176	69	58	10	0.875	0.7215189873417721
+70	1176	70	58	10	0.875	0.7215189873417721
+80	1386	71	71	11	1.0	0.8860759493670886
+80	1386	72	71	11	1.0	0.8860759493670886
+80	1386	73	71	11	1.0	0.8860759493670886
+80	1386	74	71	11	1.0	0.8860759493670886
+80	1386	75	71	11	1.0	0.8860759493670886
+80	1386	76	71	11	1.0	0.8860759493670886
+80	1386	77	71	11	1.0	0.8860759493670886
+80	1386	78	71	11	1.0	0.8860759493670886
+80	1386	79	71	11	1.0	0.8860759493670886
+80	1386	80	71	11	1.0	0.8860759493670886

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/b4.p4.pby.oby.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/b4.p4.pby.oby.tsv b/exec/java-exec/src/test/resources/window/b4.p4.pby.oby.tsv
index a5d630b..c13597b 100644
--- a/exec/java-exec/src/test/resources/window/b4.p4.pby.oby.tsv
+++ b/exec/java-exec/src/test/resources/window/b4.p4.pby.oby.tsv
@@ -8,73 +8,73 @@
 10	126	8	4	3	1.0	0.3333333333333333
 10	126	9	4	3	1.0	0.3333333333333333
 10	126	10	4	3	1.0	0.3333333333333333
-4	56	1	1	1	0.13333333333333333	0.0
-4	56	2	1	1	0.13333333333333333	0.0
-4	56	3	1	1	0.13333333333333333	0.0
-4	56	4	1	1	0.13333333333333333	0.0
-9	131	5	5	2	0.3	0.13793103448275862
-9	131	6	5	2	0.3	0.13793103448275862
-9	131	7	5	2	0.3	0.13793103448275862
-9	131	8	5	2	0.3	0.13793103448275862
-9	131	9	5	2	0.3	0.13793103448275862
-15	227	10	10	3	0.5	0.3103448275862069
-15	227	11	10	3	0.5	0.3103448275862069
-15	227	12	10	3	0.5	0.3103448275862069
-15	227	13	10	3	0.5	0.3103448275862069
-15	227	14	10	3	0.5	0.3103448275862069
-15	227	15	10	3	0.5	0.3103448275862069
-22	346	16	16	4	0.7333333333333333	0.5172413793103449
-22	346	17	16	4	0.7333333333333333	0.5172413793103449
-22	346	18	16	4	0.7333333333333333	0.5172413793103449
-22	346	19	16	4	0.7333333333333333	0.5172413793103449
-22	346	20	16	4	0.7333333333333333	0.5172413793103449
-22	346	21	16	4	0.7333333333333333	0.5172413793103449
-22	346	22	16	4	0.7333333333333333	0.5172413793103449
-30	490	23	23	5	1.0	0.7586206896551724
-30	490	24	23	5	1.0	0.7586206896551724
-30	490	25	23	5	1.0	0.7586206896551724
-30	490	26	23	5	1.0	0.7586206896551724
-30	490	27	23	5	1.0	0.7586206896551724
-30	490	28	23	5	1.0	0.7586206896551724
-30	490	29	23	5	1.0	0.7586206896551724
-30	490	30	23	5	1.0	0.7586206896551724
-9	171	1	1	1	0.45	0.0
-9	171	2	1	1	0.45	0.0
-9	171	3	1	1	0.45	0.0
-9	171	4	1	1	0.45	0.0
-9	171	5	1	1	0.45	0.0
-9	171	6	1	1	0.45	0.0
-9	171	7	1	1	0.45	0.0
-9	171	8	1	1	0.45	0.0
-9	171	9	1	1	0.45	0.0
-20	391	10	10	2	1.0	0.47368421052631576
-20	391	11	10	2	1.0	0.47368421052631576
-20	391	12	10	2	1.0	0.47368421052631576
-20	391	13	10	2	1.0	0.47368421052631576
-20	391	14	10	2	1.0	0.47368421052631576
-20	391	15	10	2	1.0	0.47368421052631576
-20	391	16	10	2	1.0	0.47368421052631576
-20	391	17	10	2	1.0	0.47368421052631576
-20	391	18	10	2	1.0	0.47368421052631576
-20	391	19	10	2	1.0	0.47368421052631576
-20	391	20	10	2	1.0	0.47368421052631576
-11	231	1	1	1	0.55	0.0
-11	231	2	1	1	0.55	0.0
-11	231	3	1	1	0.55	0.0
-11	231	4	1	1	0.55	0.0
-11	231	5	1	1	0.55	0.0
-11	231	6	1	1	0.55	0.0
-11	231	7	1	1	0.55	0.0
-11	231	8	1	1	0.55	0.0
-11	231	9	1	1	0.55	0.0
-11	231	10	1	1	0.55	0.0
-11	231	11	1	1	0.55	0.0
-20	429	12	12	2	1.0	0.5789473684210527
-20	429	13	12	2	1.0	0.5789473684210527
-20	429	14	12	2	1.0	0.5789473684210527
-20	429	15	12	2	1.0	0.5789473684210527
-20	429	16	12	2	1.0	0.5789473684210527
-20	429	17	12	2	1.0	0.5789473684210527
-20	429	18	12	2	1.0	0.5789473684210527
-20	429	19	12	2	1.0	0.5789473684210527
-20	429	20	12	2	1.0	0.5789473684210527
+3	39	1	1	1	0.1	0.0
+3	39	2	1	1	0.1	0.0
+3	39	3	1	1	0.1	0.0
+7	95	4	4	2	0.23333333333333334	0.10344827586206896
+7	95	5	4	2	0.23333333333333334	0.10344827586206896
+7	95	6	4	2	0.23333333333333334	0.10344827586206896
+7	95	7	4	2	0.23333333333333334	0.10344827586206896
+12	170	8	8	3	0.4	0.2413793103448276
+12	170	9	8	3	0.4	0.2413793103448276
+12	170	10	8	3	0.4	0.2413793103448276
+12	170	11	8	3	0.4	0.2413793103448276
+12	170	12	8	3	0.4	0.2413793103448276
+18	266	13	13	4	0.6	0.41379310344827586
+18	266	14	13	4	0.6	0.41379310344827586
+18	266	15	13	4	0.6	0.41379310344827586
+18	266	16	13	4	0.6	0.41379310344827586
+18	266	17	13	4	0.6	0.41379310344827586
+18	266	18	13	4	0.6	0.41379310344827586
+25	385	19	19	5	0.8333333333333334	0.6206896551724138
+25	385	20	19	5	0.8333333333333334	0.6206896551724138
+25	385	21	19	5	0.8333333333333334	0.6206896551724138
+25	385	22	19	5	0.8333333333333334	0.6206896551724138
+25	385	23	19	5	0.8333333333333334	0.6206896551724138
+25	385	24	19	5	0.8333333333333334	0.6206896551724138
+25	385	25	19	5	0.8333333333333334	0.6206896551724138
+30	475	26	26	6	1.0	0.8620689655172413
+30	475	27	26	6	1.0	0.8620689655172413
+30	475	28	26	6	1.0	0.8620689655172413
+30	475	29	26	6	1.0	0.8620689655172413
+30	475	30	26	6	1.0	0.8620689655172413
+8	144	1	1	1	0.4	0.0
+8	144	2	1	1	0.4	0.0
+8	144	3	1	1	0.4	0.0
+8	144	4	1	1	0.4	0.0
+8	144	5	1	1	0.4	0.0
+8	144	6	1	1	0.4	0.0
+8	144	7	1	1	0.4	0.0
+8	144	8	1	1	0.4	0.0
+17	315	9	9	2	0.85	0.42105263157894735
+17	315	10	9	2	0.85	0.42105263157894735
+17	315	11	9	2	0.85	0.42105263157894735
+17	315	12	9	2	0.85	0.42105263157894735
+17	315	13	9	2	0.85	0.42105263157894735
+17	315	14	9	2	0.85	0.42105263157894735
+17	315	15	9	2	0.85	0.42105263157894735
+17	315	16	9	2	0.85	0.42105263157894735
+17	315	17	9	2	0.85	0.42105263157894735
+20	375	18	18	3	1.0	0.8947368421052632
+20	375	19	18	3	1.0	0.8947368421052632
+20	375	20	18	3	1.0	0.8947368421052632
+10	200	1	1	1	0.5	0.0
+10	200	2	1	1	0.5	0.0
+10	200	3	1	1	0.5	0.0
+10	200	4	1	1	0.5	0.0
+10	200	5	1	1	0.5	0.0
+10	200	6	1	1	0.5	0.0
+10	200	7	1	1	0.5	0.0
+10	200	8	1	1	0.5	0.0
+10	200	9	1	1	0.5	0.0
+10	200	10	1	1	0.5	0.0
+20	410	11	11	2	1.0	0.5263157894736842
+20	410	12	11	2	1.0	0.5263157894736842
+20	410	13	11	2	1.0	0.5263157894736842
+20	410	14	11	2	1.0	0.5263157894736842
+20	410	15	11	2	1.0	0.5263157894736842
+20	410	16	11	2	1.0	0.5263157894736842
+20	410	17	11	2	1.0	0.5263157894736842
+20	410	18	11	2	1.0	0.5263157894736842
+20	410	19	11	2	1.0	0.5263157894736842
+20	410	20	11	2	1.0	0.5263157894736842

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/b4.p4.pby.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/b4.p4.pby.tsv b/exec/java-exec/src/test/resources/window/b4.p4.pby.tsv
index b2bd5e1..29c57ae 100644
--- a/exec/java-exec/src/test/resources/window/b4.p4.pby.tsv
+++ b/exec/java-exec/src/test/resources/window/b4.p4.pby.tsv
@@ -8,73 +8,73 @@
 10	126
 10	126
 10	126
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-30	490
-20	391
-20	391
-20	391
-20	391
-20	391
-20	391
-20	391
-20	391
-20	391
-20	391
-20	391
-20	391
-20	391
-20	391
-20	391
-20	391
-20	391
-20	391
-20	391
-20	391
-20	429
-20	429
-20	429
-20	429
-20	429
-20	429
-20	429
-20	429
-20	429
-20	429
-20	429
-20	429
-20	429
-20	429
-20	429
-20	429
-20	429
-20	429
-20	429
-20	429
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+30	475
+20	375
+20	375
+20	375
+20	375
+20	375
+20	375
+20	375
+20	375
+20	375
+20	375
+20	375
+20	375
+20	375
+20	375
+20	375
+20	375
+20	375
+20	375
+20	375
+20	375
+20	410
+20	410
+20	410
+20	410
+20	410
+20	410
+20	410
+20	410
+20	410
+20	410
+20	410
+20	410
+20	410
+20	410
+20	410
+20	410
+20	410
+20	410
+20	410
+20	410

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/b4.p4.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/b4.p4.tsv b/exec/java-exec/src/test/resources/window/b4.p4.tsv
index 1731fe9..b3fc67e 100644
--- a/exec/java-exec/src/test/resources/window/b4.p4.tsv
+++ b/exec/java-exec/src/test/resources/window/b4.p4.tsv
@@ -1,80 +1,80 @@
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
-80	1436
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386
+80	1386

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/b4.p4/0.data.json
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/b4.p4/0.data.json b/exec/java-exec/src/test/resources/window/b4.p4/0.data.json
index e91a75c..51a3f4c 100644
--- a/exec/java-exec/src/test/resources/window/b4.p4/0.data.json
+++ b/exec/java-exec/src/test/resources/window/b4.p4/0.data.json
@@ -1,24 +1,20 @@
-// partition rows 10, subs [1, 2, 3]
-// partition rows 30, subs [4, 5, 6, 7, 8]
-// partition rows 20, subs [9, 10]
-// partition rows 20, subs [11, 12]
-{ "employee_id":10, "position_id":2, "sub":4, "salary":14 }
-{ "employee_id":0, "position_id":1, "sub":1, "salary":11 }
-{ "employee_id":61, "position_id":4, "sub":11, "salary":21 }
-{ "employee_id":70, "position_id":4, "sub":11, "salary":21 }
-{ "employee_id":20, "position_id":2, "sub":6, "salary":16 }
-{ "employee_id":22, "position_id":2, "sub":6, "salary":16 }
-{ "employee_id":49, "position_id":3, "sub":10, "salary":20 }
-{ "employee_id":34, "position_id":2, "sub":8, "salary":18 }
-{ "employee_id":8, "position_id":1, "sub":3, "salary":13 }
-{ "employee_id":24, "position_id":2, "sub":6, "salary":16 }
-{ "employee_id":38, "position_id":2, "sub":8, "salary":18 }
-{ "employee_id":29, "position_id":2, "sub":7, "salary":17 }
-{ "employee_id":23, "position_id":2, "sub":6, "salary":16 }
-{ "employee_id":2, "position_id":1, "sub":2, "salary":12 }
-{ "employee_id":56, "position_id":3, "sub":10, "salary":20 }
-{ "employee_id":9, "position_id":1, "sub":3, "salary":13 }
-{ "employee_id":26, "position_id":2, "sub":7, "salary":17 }
-{ "employee_id":1, "position_id":1, "sub":2, "salary":12 }
-{ "employee_id":27, "position_id":2, "sub":7, "salary":17 }
-{ "employee_id":39, "position_id":2, "sub":8, "salary":18 }
+{ "employee_id":68, "position_id":4, "sub":10, "salary":20, "line_no":0 }
+{ "employee_id":58, "position_id":3, "sub":10, "salary":20, "line_no":1 }
+{ "employee_id":63, "position_id":4, "sub":10, "salary":20, "line_no":2 }
+{ "employee_id":11, "position_id":2, "sub":3, "salary":13, "line_no":3 }
+{ "employee_id":50, "position_id":3, "sub":9, "salary":19, "line_no":4 }
+{ "employee_id":6, "position_id":1, "sub":3, "salary":13, "line_no":5 }
+{ "employee_id":76, "position_id":4, "sub":11, "salary":21, "line_no":6 }
+{ "employee_id":21, "position_id":2, "sub":5, "salary":15, "line_no":7 }
+{ "employee_id":74, "position_id":4, "sub":11, "salary":21, "line_no":8 }
+{ "employee_id":38, "position_id":2, "sub":8, "salary":18, "line_no":9 }
+{ "employee_id":16, "position_id":2, "sub":4, "salary":14, "line_no":10 }
+{ "employee_id":49, "position_id":3, "sub":9, "salary":19, "line_no":11 }
+{ "employee_id":31, "position_id":2, "sub":7, "salary":17, "line_no":12 }
+{ "employee_id":52, "position_id":3, "sub":9, "salary":19, "line_no":13 }
+{ "employee_id":71, "position_id":4, "sub":11, "salary":21, "line_no":14 }
+{ "employee_id":0, "position_id":1, "sub":1, "salary":11, "line_no":15 }
+{ "employee_id":30, "position_id":2, "sub":7, "salary":17, "line_no":16 }
+{ "employee_id":5, "position_id":1, "sub":3, "salary":13, "line_no":17 }
+{ "employee_id":36, "position_id":2, "sub":8, "salary":18, "line_no":18 }
+{ "employee_id":37, "position_id":2, "sub":8, "salary":18, "line_no":19 }

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/b4.p4/1.data.json
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/b4.p4/1.data.json b/exec/java-exec/src/test/resources/window/b4.p4/1.data.json
index 52f375b..6308845 100644
--- a/exec/java-exec/src/test/resources/window/b4.p4/1.data.json
+++ b/exec/java-exec/src/test/resources/window/b4.p4/1.data.json
@@ -1,20 +1,20 @@
-{ "employee_id":5, "position_id":1, "sub":3, "salary":13 }
-{ "employee_id":52, "position_id":3, "sub":10, "salary":20 }
-{ "employee_id":50, "position_id":3, "sub":10, "salary":20 }
-{ "employee_id":36, "position_id":2, "sub":8, "salary":18 }
-{ "employee_id":76, "position_id":4, "sub":12, "salary":22 }
-{ "employee_id":54, "position_id":3, "sub":10, "salary":20 }
-{ "employee_id":79, "position_id":4, "sub":12, "salary":22 }
-{ "employee_id":33, "position_id":2, "sub":8, "salary":18 }
-{ "employee_id":15, "position_id":2, "sub":5, "salary":15 }
-{ "employee_id":30, "position_id":2, "sub":7, "salary":17 }
-{ "employee_id":72, "position_id":4, "sub":12, "salary":22 }
-{ "employee_id":64, "position_id":4, "sub":11, "salary":21 }
-{ "employee_id":74, "position_id":4, "sub":12, "salary":22 }
-{ "employee_id":73, "position_id":4, "sub":12, "salary":22 }
-{ "employee_id":47, "position_id":3, "sub":9, "salary":19 }
-{ "employee_id":3, "position_id":1, "sub":3, "salary":13 }
-{ "employee_id":44, "position_id":3, "sub":9, "salary":19 }
-{ "employee_id":11, "position_id":2, "sub":4, "salary":14 }
-{ "employee_id":69, "position_id":4, "sub":11, "salary":21 }
-{ "employee_id":48, "position_id":3, "sub":9, "salary":19 }
+{ "employee_id":34, "position_id":2, "sub":7, "salary":17, "line_no":20 }
+{ "employee_id":73, "position_id":4, "sub":11, "salary":21, "line_no":21 }
+{ "employee_id":39, "position_id":2, "sub":8, "salary":18, "line_no":22 }
+{ "employee_id":70, "position_id":4, "sub":11, "salary":21, "line_no":23 }
+{ "employee_id":72, "position_id":4, "sub":11, "salary":21, "line_no":24 }
+{ "employee_id":22, "position_id":2, "sub":6, "salary":16, "line_no":25 }
+{ "employee_id":29, "position_id":2, "sub":7, "salary":17, "line_no":26 }
+{ "employee_id":59, "position_id":3, "sub":10, "salary":20, "line_no":27 }
+{ "employee_id":12, "position_id":2, "sub":3, "salary":13, "line_no":28 }
+{ "employee_id":69, "position_id":4, "sub":10, "salary":20, "line_no":29 }
+{ "employee_id":60, "position_id":4, "sub":10, "salary":20, "line_no":30 }
+{ "employee_id":75, "position_id":4, "sub":11, "salary":21, "line_no":31 }
+{ "employee_id":47, "position_id":3, "sub":8, "salary":18, "line_no":32 }
+{ "employee_id":54, "position_id":3, "sub":9, "salary":19, "line_no":33 }
+{ "employee_id":66, "position_id":4, "sub":10, "salary":20, "line_no":34 }
+{ "employee_id":25, "position_id":2, "sub":6, "salary":16, "line_no":35 }
+{ "employee_id":19, "position_id":2, "sub":5, "salary":15, "line_no":36 }
+{ "employee_id":77, "position_id":4, "sub":11, "salary":21, "line_no":37 }
+{ "employee_id":61, "position_id":4, "sub":10, "salary":20, "line_no":38 }
+{ "employee_id":14, "position_id":2, "sub":4, "salary":14, "line_no":39 }

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/b4.p4/2.data.json
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/b4.p4/2.data.json b/exec/java-exec/src/test/resources/window/b4.p4/2.data.json
index 9ecc5ed..69fd8f5 100644
--- a/exec/java-exec/src/test/resources/window/b4.p4/2.data.json
+++ b/exec/java-exec/src/test/resources/window/b4.p4/2.data.json
@@ -1,20 +1,20 @@
-{ "employee_id":68, "position_id":4, "sub":11, "salary":21 }
-{ "employee_id":6, "position_id":1, "sub":3, "salary":13 }
-{ "employee_id":42, "position_id":3, "sub":9, "salary":19 }
-{ "employee_id":53, "position_id":3, "sub":10, "salary":20 }
-{ "employee_id":46, "position_id":3, "sub":9, "salary":19 }
-{ "employee_id":58, "position_id":3, "sub":10, "salary":20 }
-{ "employee_id":71, "position_id":4, "sub":12, "salary":22 }
-{ "employee_id":21, "position_id":2, "sub":6, "salary":16 }
-{ "employee_id":59, "position_id":3, "sub":10, "salary":20 }
-{ "employee_id":16, "position_id":2, "sub":5, "salary":15 }
-{ "employee_id":41, "position_id":3, "sub":9, "salary":19 }
-{ "employee_id":14, "position_id":2, "sub":5, "salary":15 }
-{ "employee_id":25, "position_id":2, "sub":7, "salary":17 }
-{ "employee_id":60, "position_id":4, "sub":11, "salary":21 }
-{ "employee_id":7, "position_id":1, "sub":3, "salary":13 }
-{ "employee_id":55, "position_id":3, "sub":10, "salary":20 }
-{ "employee_id":75, "position_id":4, "sub":12, "salary":22 }
-{ "employee_id":28, "position_id":2, "sub":7, "salary":17 }
-{ "employee_id":4, "position_id":1, "sub":3, "salary":13 }
-{ "employee_id":67, "position_id":4, "sub":11, "salary":21 }
+{ "employee_id":62, "position_id":4, "sub":10, "salary":20, "line_no":40 }
+{ "employee_id":64, "position_id":4, "sub":10, "salary":20, "line_no":41 }
+{ "employee_id":24, "position_id":2, "sub":6, "salary":16, "line_no":42 }
+{ "employee_id":55, "position_id":3, "sub":9, "salary":19, "line_no":43 }
+{ "employee_id":2, "position_id":1, "sub":2, "salary":12, "line_no":44 }
+{ "employee_id":32, "position_id":2, "sub":7, "salary":17, "line_no":45 }
+{ "employee_id":46, "position_id":3, "sub":8, "salary":18, "line_no":46 }
+{ "employee_id":9, "position_id":1, "sub":3, "salary":13, "line_no":47 }
+{ "employee_id":8, "position_id":1, "sub":3, "salary":13, "line_no":48 }
+{ "employee_id":67, "position_id":4, "sub":10, "salary":20, "line_no":49 }
+{ "employee_id":28, "position_id":2, "sub":7, "salary":17, "line_no":50 }
+{ "employee_id":35, "position_id":2, "sub":8, "salary":18, "line_no":51 }
+{ "employee_id":57, "position_id":3, "sub":10, "salary":20, "line_no":52 }
+{ "employee_id":42, "position_id":3, "sub":8, "salary":18, "line_no":53 }
+{ "employee_id":48, "position_id":3, "sub":9, "salary":19, "line_no":54 }
+{ "employee_id":43, "position_id":3, "sub":8, "salary":18, "line_no":55 }
+{ "employee_id":45, "position_id":3, "sub":8, "salary":18, "line_no":56 }
+{ "employee_id":51, "position_id":3, "sub":9, "salary":19, "line_no":57 }
+{ "employee_id":26, "position_id":2, "sub":6, "salary":16, "line_no":58 }
+{ "employee_id":18, "position_id":2, "sub":5, "salary":15, "line_no":59 }

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/b4.p4/3.data.json
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/b4.p4/3.data.json b/exec/java-exec/src/test/resources/window/b4.p4/3.data.json
index 32d2ad1..7544bf7 100644
--- a/exec/java-exec/src/test/resources/window/b4.p4/3.data.json
+++ b/exec/java-exec/src/test/resources/window/b4.p4/3.data.json
@@ -1,20 +1,20 @@
-{ "employee_id":17, "position_id":2, "sub":5, "salary":15 }
-{ "employee_id":18, "position_id":2, "sub":5, "salary":15 }
-{ "employee_id":35, "position_id":2, "sub":8, "salary":18 }
-{ "employee_id":37, "position_id":2, "sub":8, "salary":18 }
-{ "employee_id":45, "position_id":3, "sub":9, "salary":19 }
-{ "employee_id":65, "position_id":4, "sub":11, "salary":21 }
-{ "employee_id":31, "position_id":2, "sub":7, "salary":17 }
-{ "employee_id":40, "position_id":3, "sub":9, "salary":19 }
-{ "employee_id":63, "position_id":4, "sub":11, "salary":21 }
-{ "employee_id":43, "position_id":3, "sub":9, "salary":19 }
-{ "employee_id":19, "position_id":2, "sub":6, "salary":16 }
-{ "employee_id":51, "position_id":3, "sub":10, "salary":20 }
-{ "employee_id":12, "position_id":2, "sub":4, "salary":14 }
-{ "employee_id":32, "position_id":2, "sub":8, "salary":18 }
-{ "employee_id":66, "position_id":4, "sub":11, "salary":21 }
-{ "employee_id":13, "position_id":2, "sub":4, "salary":14 }
-{ "employee_id":78, "position_id":4, "sub":12, "salary":22 }
-{ "employee_id":62, "position_id":4, "sub":11, "salary":21 }
-{ "employee_id":57, "position_id":3, "sub":10, "salary":20 }
-{ "employee_id":77, "position_id":4, "sub":12, "salary":22 }
+{ "employee_id":7, "position_id":1, "sub":3, "salary":13, "line_no":60 }
+{ "employee_id":33, "position_id":2, "sub":7, "salary":17, "line_no":61 }
+{ "employee_id":53, "position_id":3, "sub":9, "salary":19, "line_no":62 }
+{ "employee_id":27, "position_id":2, "sub":6, "salary":16, "line_no":63 }
+{ "employee_id":13, "position_id":2, "sub":4, "salary":14, "line_no":64 }
+{ "employee_id":56, "position_id":3, "sub":9, "salary":19, "line_no":65 }
+{ "employee_id":65, "position_id":4, "sub":10, "salary":20, "line_no":66 }
+{ "employee_id":17, "position_id":2, "sub":5, "salary":15, "line_no":67 }
+{ "employee_id":41, "position_id":3, "sub":8, "salary":18, "line_no":68 }
+{ "employee_id":3, "position_id":1, "sub":3, "salary":13, "line_no":69 }
+{ "employee_id":20, "position_id":2, "sub":5, "salary":15, "line_no":70 }
+{ "employee_id":15, "position_id":2, "sub":4, "salary":14, "line_no":71 }
+{ "employee_id":23, "position_id":2, "sub":6, "salary":16, "line_no":72 }
+{ "employee_id":78, "position_id":4, "sub":11, "salary":21, "line_no":73 }
+{ "employee_id":4, "position_id":1, "sub":3, "salary":13, "line_no":74 }
+{ "employee_id":40, "position_id":3, "sub":8, "salary":18, "line_no":75 }
+{ "employee_id":10, "position_id":2, "sub":3, "salary":13, "line_no":76 }
+{ "employee_id":1, "position_id":1, "sub":2, "salary":12, "line_no":77 }
+{ "employee_id":79, "position_id":4, "sub":11, "salary":21, "line_no":78 }
+{ "employee_id":44, "position_id":3, "sub":8, "salary":18, "line_no":79 }

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/fewRowsAllData.parquet
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/fewRowsAllData.parquet b/exec/java-exec/src/test/resources/window/fewRowsAllData.parquet
new file mode 100644
index 0000000..640afe5
Binary files /dev/null and b/exec/java-exec/src/test/resources/window/fewRowsAllData.parquet
differ

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/fval.alltypes.sql
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/fval.alltypes.sql b/exec/java-exec/src/test/resources/window/fval.alltypes.sql
new file mode 100644
index 0000000..b11db6f
--- /dev/null
+++ b/exec/java-exec/src/test/resources/window/fval.alltypes.sql
@@ -0,0 +1,14 @@
+select
+  first_value(col0) over w as col0,
+  first_value(col1) over w as col1,
+  first_value(col2) over w as col2,
+  first_value(col3) over w as col3,
+  first_value(col4) over w as col4,
+  first_value(col5) over w as col5,
+  first_value(col6) over w as col6,
+  first_value(col7) over w as col7,
+  first_value(col8) over w as col8
+from
+  dfs_test.`%s/window/fewRowsAllData.parquet`
+window w as ()
+limit 1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/fval.pby.sql
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/fval.pby.sql b/exec/java-exec/src/test/resources/window/fval.pby.sql
new file mode 100644
index 0000000..29d7f54
--- /dev/null
+++ b/exec/java-exec/src/test/resources/window/fval.pby.sql
@@ -0,0 +1,4 @@
+select
+  first_value(employee_id) over(partition by position_id order by line_no) as `first_value`
+from
+  dfs_test.`%s/window/b4.p4`
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/lag.oby.sql
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/lag.oby.sql b/exec/java-exec/src/test/resources/window/lag.oby.sql
new file mode 100644
index 0000000..91dadb5
--- /dev/null
+++ b/exec/java-exec/src/test/resources/window/lag.oby.sql
@@ -0,0 +1,3 @@
+select
+  lag(line_no) over(order by sub, employee_id) as `lag`
+from dfs_test.`%s/window/b4.p4`
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/lag.pby.oby.sql
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/lag.pby.oby.sql b/exec/java-exec/src/test/resources/window/lag.pby.oby.sql
new file mode 100644
index 0000000..64a890e
--- /dev/null
+++ b/exec/java-exec/src/test/resources/window/lag.pby.oby.sql
@@ -0,0 +1,3 @@
+select
+  lag(line_no) over(partition by position_id order by sub, employee_id) as `lag`
+from dfs_test.`%s/window/b4.p4`
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/lead.oby.sql
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/lead.oby.sql b/exec/java-exec/src/test/resources/window/lead.oby.sql
new file mode 100644
index 0000000..211a142
--- /dev/null
+++ b/exec/java-exec/src/test/resources/window/lead.oby.sql
@@ -0,0 +1,3 @@
+select
+  lead(line_no) over(order by sub, employee_id) as `lead`
+from dfs_test.`%s/window/b4.p4`
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/lead.pby.oby.sql
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/lead.pby.oby.sql b/exec/java-exec/src/test/resources/window/lead.pby.oby.sql
new file mode 100644
index 0000000..7d9904a
--- /dev/null
+++ b/exec/java-exec/src/test/resources/window/lead.pby.oby.sql
@@ -0,0 +1,3 @@
+select
+  lead(line_no) over(partition by position_id order by sub, employee_id) as `lead`
+from dfs_test.`%s/window/b4.p4`
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/lval.alltypes.sql
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/lval.alltypes.sql b/exec/java-exec/src/test/resources/window/lval.alltypes.sql
new file mode 100644
index 0000000..9f2e7fd
--- /dev/null
+++ b/exec/java-exec/src/test/resources/window/lval.alltypes.sql
@@ -0,0 +1,14 @@
+select
+  last_value(col0) over w as col0,
+  last_value(col1) over w as col1,
+  last_value(col2) over w as col2,
+  last_value(col3) over w as col3,
+  last_value(col4) over w as col4,
+  last_value(col5) over w as col5,
+  last_value(col6) over w as col6,
+  last_value(col7) over w as col7,
+  last_value(col8) over w as col8
+from
+  dfs_test.`%s/window/fewRowsAllData.parquet`
+window w as ()
+limit 1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/lval.pby.oby.sql
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/lval.pby.oby.sql b/exec/java-exec/src/test/resources/window/lval.pby.oby.sql
new file mode 100644
index 0000000..6e77a54
--- /dev/null
+++ b/exec/java-exec/src/test/resources/window/lval.pby.oby.sql
@@ -0,0 +1,4 @@
+select
+  last_value(employee_id) over(partition by position_id order by line_no) as `last_value`
+from
+  dfs_test.`%s/window/b4.p4`
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/drill/blob/b55e2328/exec/java-exec/src/test/resources/window/ntile.sql
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/ntile.sql b/exec/java-exec/src/test/resources/window/ntile.sql
new file mode 100644
index 0000000..44184a8
--- /dev/null
+++ b/exec/java-exec/src/test/resources/window/ntile.sql
@@ -0,0 +1,4 @@
+select
+  ntile(3) over(partition by position_id order by 1) as `ntile`
+from
+  dfs_test.`%s/window/b2.p4`
\ No newline at end of file


Mime
View raw message