You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sql/core/src/test/resources/sql-tests/results/pgSQL/window_part1.sql.out
+38-68Lines changed: 38 additions & 68 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
-- Automatically generated by SQLQueryTestSuite
2
-
-- Number of queries: 57
2
+
-- Number of queries: 56
3
3
4
4
5
5
-- !query 0
@@ -731,42 +731,12 @@ struct<four:int,ten:int,sum(ten) OVER (PARTITION BY four ORDER BY ten ASC NULLS
731
731
732
732
-- !query 43
733
733
SELECT four, ten/4 as two,
734
-
sum(ten/4) over (partition by four order by ten/4 range between unbounded preceding and current row),
735
-
last(ten/4) over (partition by four order by ten/4 range between unbounded preceding and current row)
736
-
FROM (select distinct ten, four from tenk1) ss
737
-
-- !query 43 schema
738
-
struct<four:int,two:int,sum((ten div 4)) OVER (PARTITION BY four ORDER BY (ten div 4) ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW):bigint,last((ten div 4), false) OVER (PARTITION BY four ORDER BY (ten div 4) ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW):int>
739
-
-- !query 43 output
740
-
0 0 0 0
741
-
0 0 0 0
742
-
0 1 2 1
743
-
0 1 2 1
744
-
0 2 4 2
745
-
1 0 0 0
746
-
1 0 0 0
747
-
1 1 2 1
748
-
1 1 2 1
749
-
1 2 4 2
750
-
2 0 0 0
751
-
2 0 0 0
752
-
2 1 2 1
753
-
2 1 2 1
754
-
2 2 4 2
755
-
3 0 0 0
756
-
3 0 0 0
757
-
3 1 2 1
758
-
3 1 2 1
759
-
3 2 4 2
760
-
761
-
762
-
-- !query 44
763
-
SELECT four, ten/4 as two,
764
734
sum(ten/4) over (partition by four order by ten/4 rows between unbounded preceding and current row),
765
735
last(ten/4) over (partition by four order by ten/4 rows between unbounded preceding and current row)
766
736
FROM (select distinct ten, four from tenk1) ss
767
-
-- !query 44 schema
737
+
-- !query 43 schema
768
738
struct<four:int,two:int,sum((ten div 4)) OVER (PARTITION BY four ORDER BY (ten div 4) ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW):bigint,last((ten div 4), false) OVER (PARTITION BY four ORDER BY (ten div 4) ASC NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW):int>
769
-
-- !query 44 output
739
+
-- !query 43 output
770
740
0 0 0 0
771
741
0 0 0 0
772
742
0 1 1 1
@@ -789,13 +759,13 @@ struct<four:int,two:int,sum((ten div 4)) OVER (PARTITION BY four ORDER BY (ten d
789
759
3 2 4 2
790
760
791
761
792
-
-- !query 45
762
+
-- !query 44
793
763
SELECT sum(unique1) over (order by four range between current row and unbounded following),
794
764
unique1, four
795
765
FROM tenk1 WHERE unique1 < 10
796
-
-- !query 45 schema
766
+
-- !query 44 schema
797
767
struct<sum(unique1) OVER (ORDER BY four ASC NULLS FIRST RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING):bigint,unique1:int,four:int>
798
-
-- !query 45 output
768
+
-- !query 44 output
799
769
10 3 3
800
770
10 7 3
801
771
18 2 2
@@ -808,13 +778,13 @@ struct<sum(unique1) OVER (ORDER BY four ASC NULLS FIRST RANGE BETWEEN CURRENT RO
808
778
45 8 0
809
779
810
780
811
-
-- !query 46
781
+
-- !query 45
812
782
SELECT sum(unique1) over (rows between current row and unbounded following),
813
783
unique1, four
814
784
FROM tenk1 WHERE unique1 < 10
815
-
-- !query 46 schema
785
+
-- !query 45 schema
816
786
struct<sum(unique1) OVER (ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING):bigint,unique1:int,four:int>
817
-
-- !query 46 output
787
+
-- !query 45 output
818
788
0 0 0
819
789
10 3 3
820
790
15 5 1
@@ -827,13 +797,13 @@ struct<sum(unique1) OVER (ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING):bigi
827
797
7 7 3
828
798
829
799
830
-
-- !query 47
800
+
-- !query 46
831
801
SELECT sum(unique1) over (rows between 2 preceding and 2 following),
832
802
unique1, four
833
803
FROM tenk1 WHERE unique1 < 10
834
-
-- !query 47 schema
804
+
-- !query 46 schema
835
805
struct<sum(unique1) OVER (ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING):bigint,unique1:int,four:int>
836
-
-- !query 47 output
806
+
-- !query 46 output
837
807
10 0 0
838
808
13 2 2
839
809
15 7 3
@@ -846,13 +816,13 @@ struct<sum(unique1) OVER (ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING):bigint,uniqu
846
816
7 4 0
847
817
848
818
849
-
-- !query 48
819
+
-- !query 47
850
820
SELECT sum(unique1) over (rows between 2 preceding and 1 preceding),
851
821
unique1, four
852
822
FROM tenk1 WHERE unique1 < 10
853
-
-- !query 48 schema
823
+
-- !query 47 schema
854
824
struct<sum(unique1) OVER (ROWS BETWEEN 2 PRECEDING AND 1 PRECEDING):bigint,unique1:int,four:int>
855
-
-- !query 48 output
825
+
-- !query 47 output
856
826
10 0 0
857
827
13 3 3
858
828
15 8 0
@@ -865,13 +835,13 @@ struct<sum(unique1) OVER (ROWS BETWEEN 2 PRECEDING AND 1 PRECEDING):bigint,uniqu
865
835
NULL 4 0
866
836
867
837
868
-
-- !query 49
838
+
-- !query 48
869
839
SELECT sum(unique1) over (rows between 1 following and 3 following),
870
840
unique1, four
871
841
FROM tenk1 WHERE unique1 < 10
872
-
-- !query 49 schema
842
+
-- !query 48 schema
873
843
struct<sum(unique1) OVER (ROWS BETWEEN 1 FOLLOWING AND 3 FOLLOWING):bigint,unique1:int,four:int>
874
-
-- !query 49 output
844
+
-- !query 48 output
875
845
0 7 3
876
846
10 5 1
877
847
15 8 0
@@ -884,13 +854,13 @@ struct<sum(unique1) OVER (ROWS BETWEEN 1 FOLLOWING AND 3 FOLLOWING):bigint,uniqu
884
854
NULL 0 0
885
855
886
856
887
-
-- !query 50
857
+
-- !query 49
888
858
SELECT sum(unique1) over (rows between unbounded preceding and 1 following),
889
859
unique1, four
890
860
FROM tenk1 WHERE unique1 < 10
891
-
-- !query 50 schema
861
+
-- !query 49 schema
892
862
struct<sum(unique1) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING):bigint,unique1:int,four:int>
893
-
-- !query 50 output
863
+
-- !query 49 output
894
864
13 1 1
895
865
22 6 2
896
866
30 9 1
@@ -903,21 +873,21 @@ struct<sum(unique1) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING):bigi
903
873
7 2 2
904
874
905
875
906
-
-- !query 51
876
+
-- !query 50
907
877
CREATE TEMP VIEW v_window AS
908
878
SELECT i.id, sum(i.id) over (order by i.id rows between 1 preceding and 1 following) as sum_rows
0 commit comments