@@ -30,16 +30,28 @@ def calc_zscore(s):
30
30
lambda t , win : t .float_col .lead ().over (win ),
31
31
lambda t : t .float_col .shift (- 1 ),
32
32
id = 'lead' ,
33
+ marks = pytest .mark .broken (
34
+ ["clickhouse" ],
35
+ reason = "upstream is broken; returns all nulls" ,
36
+ ),
33
37
),
34
38
param (
35
39
lambda t , win : t .id .rank ().over (win ),
36
40
lambda t : t .id .rank (method = 'min' ).astype ('int64' ) - 1 ,
37
41
id = 'rank' ,
42
+ marks = pytest .mark .broken (
43
+ ["clickhouse" ],
44
+ reason = "upstream is broken" ,
45
+ ),
38
46
),
39
47
param (
40
48
lambda t , win : t .id .dense_rank ().over (win ),
41
49
lambda t : t .id .rank (method = 'dense' ).astype ('int64' ) - 1 ,
42
50
id = 'dense_rank' ,
51
+ marks = pytest .mark .broken (
52
+ ["clickhouse" ],
53
+ reason = "upstream is broken" ,
54
+ ),
43
55
),
44
56
param (
45
57
lambda t , win : t .id .percent_rank ().over (win ),
@@ -52,12 +64,13 @@ def calc_zscore(s):
52
64
)
53
65
).reset_index (drop = True , level = [0 ]),
54
66
id = 'percent_rank' ,
67
+ marks = pytest .mark .notyet (["clickhouse" ]),
55
68
),
56
69
param (
57
70
lambda t , win : t .id .cume_dist ().over (win ),
58
71
lambda t : t .id .rank (method = 'min' ) / t .id .transform (len ),
59
72
id = 'cume_dist' ,
60
- marks = pytest .mark .notimpl (["pyspark" ]),
73
+ marks = pytest .mark .notimpl (["clickhouse" , " pyspark" ]),
61
74
),
62
75
param (
63
76
lambda t , win : t .float_col .ntile (buckets = 7 ).over (win ),
@@ -99,7 +112,13 @@ def calc_zscore(s):
99
112
lambda _ , win : ibis .row_number ().over (win ),
100
113
lambda t : t .cumcount (),
101
114
id = 'row_number' ,
102
- marks = pytest .mark .notimpl (["pandas" ]),
115
+ marks = [
116
+ pytest .mark .notimpl (["pandas" ]),
117
+ pytest .mark .broken (
118
+ ["clickhouse" ],
119
+ reason = "upstream implementation cannot handle subtraction" ,
120
+ ),
121
+ ],
103
122
),
104
123
param (
105
124
lambda t , win : t .double_col .cumsum ().over (win ),
@@ -143,7 +162,14 @@ def calc_zscore(s):
143
162
),
144
163
id = 'cumnotany' ,
145
164
marks = pytest .mark .notyet (
146
- ("duckdb" , 'impala' , 'postgres' , 'mysql' , 'sqlite' ),
165
+ (
166
+ "clickhouse" ,
167
+ "duckdb" ,
168
+ 'impala' ,
169
+ 'postgres' ,
170
+ 'mysql' ,
171
+ 'sqlite' ,
172
+ ),
147
173
reason = "notany() over window not supported" ,
148
174
),
149
175
),
@@ -167,7 +193,14 @@ def calc_zscore(s):
167
193
),
168
194
id = 'cumnotall' ,
169
195
marks = pytest .mark .notyet (
170
- ("duckdb" , 'impala' , 'postgres' , 'mysql' , 'sqlite' ),
196
+ (
197
+ "clickhouse" ,
198
+ "duckdb" ,
199
+ 'impala' ,
200
+ 'postgres' ,
201
+ 'mysql' ,
202
+ 'sqlite' ,
203
+ ),
171
204
reason = "notall() over window not supported" ,
172
205
),
173
206
),
@@ -204,7 +237,7 @@ def calc_zscore(s):
204
237
),
205
238
],
206
239
)
207
- @pytest .mark .notimpl (["clickhouse" , " dask" , "datafusion" ])
240
+ @pytest .mark .notimpl (["dask" , "datafusion" ])
208
241
def test_grouped_bounded_expanding_window (
209
242
backend , alltypes , df , result_fn , expected_fn
210
243
):
@@ -244,14 +277,21 @@ def test_grouped_bounded_expanding_window(
244
277
id = 'mean_udf' ,
245
278
marks = [
246
279
pytest .mark .notimpl (
247
- ["duckdb" , "impala" , "mysql" , "postgres" , "sqlite" ]
280
+ [
281
+ "clickhouse" ,
282
+ "duckdb" ,
283
+ "impala" ,
284
+ "mysql" ,
285
+ "postgres" ,
286
+ "sqlite" ,
287
+ ]
248
288
)
249
289
],
250
290
),
251
291
],
252
292
)
253
293
# Some backends do not support non-grouped window specs
254
- @pytest .mark .notimpl (["clickhouse" , " dask" , "datafusion" ])
294
+ @pytest .mark .notimpl (["dask" , "datafusion" ])
255
295
def test_ungrouped_bounded_expanding_window (
256
296
backend , alltypes , df , result_fn , expected_fn
257
297
):
@@ -271,7 +311,7 @@ def test_ungrouped_bounded_expanding_window(
271
311
backend .assert_series_equal (left , right )
272
312
273
313
274
- @pytest .mark .notimpl (["clickhouse" , " dask" , "datafusion" , "pandas" ])
314
+ @pytest .mark .notimpl (["dask" , "datafusion" , "pandas" ])
275
315
def test_grouped_bounded_following_window (backend , alltypes , df ):
276
316
window = ibis .window (
277
317
preceding = 0 ,
@@ -326,7 +366,7 @@ def test_grouped_bounded_following_window(backend, alltypes, df):
326
366
),
327
367
],
328
368
)
329
- @pytest .mark .notimpl (["clickhouse" , " dask" , "datafusion" ])
369
+ @pytest .mark .notimpl (["dask" , "datafusion" ])
330
370
def test_grouped_bounded_preceding_window (backend , alltypes , df , window_fn ):
331
371
window = window_fn (alltypes )
332
372
@@ -363,7 +403,15 @@ def test_grouped_bounded_preceding_window(backend, alltypes, df, window_fn):
363
403
lambda gb : (gb .double_col .transform ('mean' )),
364
404
id = 'mean_udf' ,
365
405
marks = pytest .mark .notimpl (
366
- ["dask" , "duckdb" , "impala" , "mysql" , "postgres" , "sqlite" ]
406
+ [
407
+ "clickhouse" ,
408
+ "dask" ,
409
+ "duckdb" ,
410
+ "impala" ,
411
+ "mysql" ,
412
+ "postgres" ,
413
+ "sqlite" ,
414
+ ]
367
415
),
368
416
),
369
417
],
@@ -377,7 +425,7 @@ def test_grouped_bounded_preceding_window(backend, alltypes, df, window_fn):
377
425
param (False , id = 'unordered' ),
378
426
],
379
427
)
380
- @pytest .mark .notimpl (["clickhouse" , " datafusion" ])
428
+ @pytest .mark .notimpl (["datafusion" ])
381
429
def test_grouped_unbounded_window (
382
430
backend , alltypes , df , result_fn , expected_fn , ordered
383
431
):
@@ -417,7 +465,12 @@ def test_grouped_unbounded_window(
417
465
lambda df : pd .Series ([df .double_col .mean ()] * len (df .double_col )),
418
466
True ,
419
467
id = 'ordered-mean' ,
420
- marks = pytest .mark .notimpl (["dask" , "impala" , "pandas" ]),
468
+ marks = [
469
+ pytest .mark .notimpl (["dask" , "impala" , "pandas" ]),
470
+ pytest .mark .broken (
471
+ ["clickhouse" ], reason = "upstream appears broken"
472
+ ),
473
+ ],
421
474
),
422
475
param (
423
476
lambda t , win : t .double_col .mean ().over (win ),
@@ -432,6 +485,7 @@ def test_grouped_unbounded_window(
432
485
id = 'ordered-mean_udf' ,
433
486
marks = pytest .mark .notimpl (
434
487
[
488
+ "clickhouse" ,
435
489
"dask" ,
436
490
"duckdb" ,
437
491
"impala" ,
@@ -448,7 +502,14 @@ def test_grouped_unbounded_window(
448
502
False ,
449
503
id = 'unordered-mean_udf' ,
450
504
marks = pytest .mark .notimpl (
451
- ["duckdb" , "impala" , "mysql" , "postgres" , "sqlite" ]
505
+ [
506
+ "clickhouse" ,
507
+ "duckdb" ,
508
+ "impala" ,
509
+ "mysql" ,
510
+ "postgres" ,
511
+ "sqlite" ,
512
+ ]
452
513
),
453
514
),
454
515
# Analytic ops
@@ -471,14 +532,16 @@ def test_grouped_unbounded_window(
471
532
lambda df : df .float_col .shift (- 1 ),
472
533
True ,
473
534
id = 'ordered-lead' ,
474
- marks = pytest .mark .notimpl (["dask" ]),
535
+ marks = pytest .mark .notimpl (["clickhouse" , " dask" ]),
475
536
),
476
537
param (
477
538
lambda t , win : t .float_col .lead ().over (win ),
478
539
lambda df : df .float_col .shift (- 1 ),
479
540
False ,
480
541
id = 'unordered-lead' ,
481
- marks = pytest .mark .notimpl (["dask" , "mysql" , "pyspark" ]),
542
+ marks = pytest .mark .notimpl (
543
+ ["clickhouse" , "dask" , "mysql" , "pyspark" ]
544
+ ),
482
545
),
483
546
param (
484
547
lambda t , win : calc_zscore (t .double_col ).over (win ),
@@ -487,6 +550,7 @@ def test_grouped_unbounded_window(
487
550
id = 'ordered-zscore_udf' ,
488
551
marks = pytest .mark .notimpl (
489
552
[
553
+ "clickhouse" ,
490
554
"dask" ,
491
555
"duckdb" ,
492
556
"impala" ,
@@ -504,13 +568,21 @@ def test_grouped_unbounded_window(
504
568
False ,
505
569
id = 'unordered-zscore_udf' ,
506
570
marks = pytest .mark .notimpl (
507
- ["duckdb" , "impala" , "mysql" , "postgres" , "pyspark" , "sqlite" ]
571
+ [
572
+ "clickhouse" ,
573
+ "duckdb" ,
574
+ "impala" ,
575
+ "mysql" ,
576
+ "postgres" ,
577
+ "pyspark" ,
578
+ "sqlite" ,
579
+ ]
508
580
),
509
581
),
510
582
],
511
583
)
512
584
# Some backends do not support non-grouped window specs
513
- @pytest .mark .notimpl (["clickhouse" , " datafusion" ])
585
+ @pytest .mark .notimpl (["datafusion" ])
514
586
def test_ungrouped_unbounded_window (
515
587
backend , alltypes , df , con , result_fn , expected_fn , ordered
516
588
):
@@ -541,7 +613,11 @@ def test_ungrouped_unbounded_window(
541
613
backend .assert_series_equal (left , right )
542
614
543
615
544
- @pytest .mark .notimpl (["clickhouse" , "dask" , "datafusion" , "impala" , "pandas" ])
616
+ @pytest .mark .notimpl (["dask" , "datafusion" , "impala" , "pandas" ])
617
+ @pytest .mark .notyet (
618
+ ["clickhouse" ],
619
+ reason = "RANGE OFFSET frame for 'DB::ColumnNullable' ORDER BY column is not implemented" , # noqa: E501
620
+ )
545
621
def test_grouped_bounded_range_window (backend , alltypes , df ):
546
622
# Explanation of the range window spec below:
547
623
#
0 commit comments