Skip to content

Commit 4f86249

Browse files
committed
fix test
1 parent dad9ce1 commit 4f86249

File tree

3 files changed

+51
-51
lines changed

3 files changed

+51
-51
lines changed

datafusion/core/tests/dataframe/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,23 +1206,23 @@ async fn window_using_aggregates() -> Result<()> {
12061206
| | | | | | | | 1 | -85 |
12071207
| -85 | -101 | 14 | -12 | -12 | 83 | -101 | 4 | -54 |
12081208
| -85 | -101 | 17 | -25 | -25 | 83 | -101 | 5 | -31 |
1209-
| -85 | -12 | 10 | -32 | -34 | 83 | -85 | 3 | 13 |
1209+
| -85 | -12 | 10 | -34 | -34 | 83 | -85 | 3 | 13 |
12101210
| -85 | -25 | 3 | -56 | -56 | -25 | -85 | 1 | -5 |
1211-
| -85 | -31 | 18 | -29 | -28 | 83 | -101 | 5 | 36 |
1211+
| -85 | -31 | 18 | -28 | -28 | 83 | -101 | 5 | 36 |
12121212
| -85 | -38 | 16 | -25 | -25 | 83 | -101 | 4 | 65 |
12131213
| -85 | -43 | 7 | -43 | -43 | 83 | -85 | 2 | 45 |
1214-
| -85 | -48 | 6 | -35 | -36 | 83 | -85 | 2 | -43 |
1215-
| -85 | -5 | 4 | -37 | -40 | -5 | -85 | 1 | 83 |
1216-
| -85 | -54 | 15 | -17 | -18 | 83 | -101 | 4 | -38 |
1214+
| -85 | -48 | 6 | -36 | -36 | 83 | -85 | 2 | -43 |
1215+
| -85 | -5 | 4 | -40 | -40 | -5 | -85 | 1 | 83 |
1216+
| -85 | -54 | 15 | -18 | -18 | 83 | -101 | 4 | -38 |
12171217
| -85 | -56 | 2 | -70 | -70 | -56 | -85 | 1 | -25 |
12181218
| -85 | -72 | 9 | -43 | -43 | 83 | -85 | 3 | -12 |
12191219
| -85 | -85 | 1 | -85 | -85 | -85 | -85 | 1 | -56 |
1220-
| -85 | 13 | 11 | -17 | -18 | 83 | -85 | 3 | 14 |
1220+
| -85 | 13 | 11 | -18 | -18 | 83 | -85 | 3 | 14 |
12211221
| -85 | 13 | 11 | -25 | -25 | 83 | -85 | 3 | 13 |
12221222
| -85 | 14 | 12 | -12 | -12 | 83 | -85 | 3 | 17 |
1223-
| -85 | 17 | 13 | -11 | -8 | 83 | -85 | 4 | -101 |
1223+
| -85 | 17 | 13 | -8 | -8 | 83 | -85 | 4 | -101 |
12241224
| -85 | 45 | 8 | -34 | -34 | 83 | -85 | 3 | -72 |
1225-
| -85 | 65 | 17 | -17 | -18 | 83 | -101 | 5 | -101 |
1225+
| -85 | 65 | 17 | -18 | -18 | 83 | -101 | 5 | -101 |
12261226
| -85 | 83 | 5 | -25 | -25 | 83 | -85 | 2 | -48 |
12271227
+-------------+----------+-----------------+---------------+--------+-----+------+----+------+
12281228
"

datafusion/sqllogictest/test_files/aggregate.slt

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2319,33 +2319,33 @@ b NULL NULL 7732.315789473684
23192319
query TI
23202320
SELECT c1, approx_percentile_cont(0.95) WITHIN GROUP (ORDER BY c3) AS c3_p95 FROM aggregate_test_100 GROUP BY 1 ORDER BY 1
23212321
----
2322-
a 73
2322+
a 65
23232323
b 68
2324-
c 122
2325-
d 124
2326-
e 115
2324+
c 118
2325+
d 123
2326+
e 112
23272327

23282328

23292329
# csv_query_approx_percentile_cont_with_weight (should be the same as above)
23302330
query TI
23312331
SELECT c1, approx_percentile_cont(c3, 0.95) AS c3_p95 FROM aggregate_test_100 GROUP BY 1 ORDER BY 1
23322332
----
2333-
a 73
2333+
a 65
23342334
b 68
2335-
c 122
2336-
d 124
2337-
e 115
2335+
c 118
2336+
d 123
2337+
e 112
23382338

23392339

23402340
# using approx_percentile_cont on 2 columns with same signature
23412341
query TII
23422342
SELECT c1, approx_percentile_cont(c2, 0.95) AS c2, approx_percentile_cont(c3, 0.95) AS c3 FROM aggregate_test_100 GROUP BY 1 ORDER BY 1
23432343
----
2344-
a 5 73
2344+
a 5 65
23452345
b 5 68
2346-
c 5 122
2347-
d 5 124
2348-
e 5 115
2346+
c 5 118
2347+
d 5 123
2348+
e 5 112
23492349

23502350
# error is unique to this UDAF
23512351
query TRR
@@ -2362,51 +2362,51 @@ e 3 40.333333333333
23622362
query TI
23632363
SELECT c1, approx_percentile_cont(0.95) WITHIN GROUP (ORDER BY c3 DESC) AS c3_p95 FROM aggregate_test_100 GROUP BY 1 ORDER BY 1
23642364
----
2365-
a -101
2366-
b -114
2367-
c -109
2365+
a -100
2366+
b -111
2367+
c -107
23682368
d -98
2369-
e -93
2369+
e -85
23702370

23712371
# csv_query_approx_percentile_cont_with_weight (2)
23722372
query TI
23732373
SELECT c1, approx_percentile_cont_with_weight(1, 0.95) WITHIN GROUP (ORDER BY c3) AS c3_p95 FROM aggregate_test_100 GROUP BY 1 ORDER BY 1
23742374
----
2375-
a 73
2375+
a 65
23762376
b 68
2377-
c 122
2378-
d 124
2379-
e 115
2377+
c 118
2378+
d 123
2379+
e 112
23802380

23812381
# csv_query_approx_percentile_cont_with_weight alternate syntax
23822382
query TI
23832383
SELECT c1, approx_percentile_cont_with_weight(c3, 1, 0.95) AS c3_p95 FROM aggregate_test_100 GROUP BY 1 ORDER BY 1
23842384
----
2385-
a 73
2385+
a 65
23862386
b 68
2387-
c 122
2388-
d 124
2389-
e 115
2387+
c 118
2388+
d 123
2389+
e 112
23902390

23912391

23922392
query TI
23932393
SELECT c1, approx_percentile_cont_with_weight(1, 0.95) WITHIN GROUP (ORDER BY c3 DESC) AS c3_p95 FROM aggregate_test_100 GROUP BY 1 ORDER BY 1
23942394
----
2395-
a -101
2396-
b -114
2397-
c -109
2395+
a -100
2396+
b -111
2397+
c -107
23982398
d -98
2399-
e -93
2399+
e -85
24002400

24012401
# csv_query_approx_percentile_cont_with_histogram_bins
24022402
query TI
24032403
SELECT c1, approx_percentile_cont(0.95, 200) WITHIN GROUP (ORDER BY c3) AS c3_p95 FROM aggregate_test_100 GROUP BY 1 ORDER BY 1
24042404
----
2405-
a 73
2405+
a 65
24062406
b 68
2407-
c 122
2408-
d 124
2409-
e 115
2407+
c 118
2408+
d 123
2409+
e 112
24102410

24112411
query TI
24122412
SELECT c1, approx_percentile_cont_with_weight(c2, 0.95) WITHIN GROUP (ORDER BY c3) AS c3_p95 FROM aggregate_test_100 GROUP BY 1 ORDER BY 1

datafusion/sqllogictest/test_files/aggregate_skip_partial.slt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,11 @@ SELECT c2, median(c5), median(c11) FROM aggregate_test_100 GROUP BY c2 ORDER BY
321321
query IIR
322322
SELECT c2, approx_median(c5), approx_median(c11) FROM aggregate_test_100 GROUP BY c2 ORDER BY c2;
323323
----
324-
1 191655437 0.59926736
325-
2 -587831330 0.43230486
324+
1 23971150 0.5922606
325+
2 -562486880 0.43422085
326326
3 240273900 0.40199697
327327
4 762932956 0.48515016
328-
5 593204320 0.5156586
328+
5 604973998 0.49842384
329329

330330
# Test approx_distinct for varchar / int
331331
query III
@@ -405,8 +405,8 @@ SELECT c2, approx_median(c3), approx_median(c11) FROM aggregate_test_100_null GR
405405
1 12 0.6067944
406406
2 1 0.46076488
407407
3 14 0.40154034
408-
4 -7 0.48515016
409-
5 -39 0.5536642
408+
4 -17 0.48515016
409+
5 -35 0.5536642
410410

411411
# Test approx_distinct with nullable fields
412412
query II
@@ -525,8 +525,8 @@ FROM aggregate_test_100 GROUP BY c2 ORDER BY c2;
525525
----
526526
1 57 -56
527527
2 52 -60
528-
3 71 -76
529-
4 65 -64
528+
3 71 -74
529+
4 65 -69
530530
5 64 -59
531531

532532
# Test count with nullable fields and filter
@@ -669,22 +669,22 @@ SELECT c2,
669669
FROM aggregate_test_100_null GROUP BY c2 ORDER BY c2;
670670
----
671671
1 -5 0.6623719
672-
2 12 0.52930677
672+
2 15 0.52930677
673673
3 13 0.32792538
674674
4 -38 0.49774808
675-
5 -21 0.47652745
675+
5 -18 0.49842384
676676

677677
# Test approx_median with nullable fields and nullable filter
678678
query II
679679
SELECT c2,
680680
approx_median(c3) FILTER (WHERE c11 > 0.5)
681681
FROM aggregate_test_100_null GROUP BY c2 ORDER BY c2;
682682
----
683-
1 35
683+
1 33
684684
2 -29
685685
3 22
686686
4 -90
687-
5 -32
687+
5 -22
688688

689689
statement ok
690690
DROP TABLE aggregate_test_100_null;

0 commit comments

Comments
 (0)