@@ -1351,7 +1351,7 @@ DROP TABLE median_window_test;
13511351query RT
13521352select approx_median(arrow_cast(col_f32, 'Float16')), arrow_typeof(approx_median(arrow_cast(col_f32, 'Float16'))) from median_table;
13531353----
1354- 2.75 Float16
1354+ 2.1992188 Float16
13551355
13561356# This shouldn't be NaN, see:
13571357# https://github.com/apache/datafusion/issues/18945
@@ -1369,7 +1369,7 @@ select
13691369 arrow_typeof(approx_percentile_cont(0.5) within group (order by arrow_cast(col_f32, 'Float16')))
13701370from median_table;
13711371----
1372- 2.75 Float16
1372+ 2.1992188 Float16
13731373
13741374query ?T
13751375select approx_median(NULL), arrow_typeof(approx_median(NULL)) from median_table;
@@ -1388,7 +1388,7 @@ select median(c), arrow_typeof(median(c)) from t;
13881388query RT
13891389select approx_median(c), arrow_typeof(approx_median(c)) from t;
13901390----
1391- 0.00035 Float64
1391+ 0.0003 Float64
13921392
13931393statement ok
13941394drop table t;
@@ -2319,33 +2319,33 @@ b NULL NULL 7732.315789473684
23192319query TI
23202320SELECT 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
23232323b 68
2324- c 122
2325- d 124
2326- e 115
2324+ c 118
2325+ d 125
2326+ e 112
23272327
23282328
23292329# csv_query_approx_percentile_cont_with_weight (should be the same as above)
23302330query TI
23312331SELECT 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
23342334b 68
2335- c 122
2336- d 124
2337- e 115
2335+ c 118
2336+ d 125
2337+ e 112
23382338
23392339
23402340# using approx_percentile_cont on 2 columns with same signature
23412341query TII
23422342SELECT 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
23452345b 5 68
2346- c 5 122
2347- d 5 124
2348- e 5 115
2346+ c 5 118
2347+ d 5 125
2348+ e 5 112
23492349
23502350# error is unique to this UDAF
23512351query TRR
@@ -2363,50 +2363,50 @@ query TI
23632363SELECT 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----
23652365a -101
2366- b -114
2367- c -109
2368- d -98
2369- e -93
2366+ b -117
2367+ c -107
2368+ d -99
2369+ e -86
23702370
23712371# csv_query_approx_percentile_cont_with_weight (2)
23722372query TI
23732373SELECT 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
23762376b 68
2377- c 122
2378- d 124
2379- e 115
2377+ c 118
2378+ d 125
2379+ e 112
23802380
23812381# csv_query_approx_percentile_cont_with_weight alternate syntax
23822382query TI
23832383SELECT 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
23862386b 68
2387- c 122
2388- d 124
2389- e 115
2387+ c 118
2388+ d 125
2389+ e 112
23902390
23912391
23922392query TI
23932393SELECT 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----
23952395a -101
2396- b -114
2397- c -109
2398- d -98
2399- e -93
2396+ b -117
2397+ c -107
2398+ d -99
2399+ e -86
24002400
24012401# csv_query_approx_percentile_cont_with_histogram_bins
24022402query TI
24032403SELECT 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
24062406b 68
2407- c 122
2408- d 124
2409- e 115
2407+ c 118
2408+ d 125
2409+ e 112
24102410
24112411query TI
24122412SELECT 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
@@ -8804,9 +8804,9 @@ FROM (SELECT * FROM stream_test ORDER BY g LIMIT 10000)
88048804GROUP BY g
88058805ORDER BY g;
88068806----
8807- 1 2 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5
8808- 2 2 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5
8809- 3 2 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5
8807+ 1 2 1 1.5 1.5 1 1 1.5 1 1
8808+ 2 2 1 1.5 1.5 1 1 1.5 1 1
8809+ 3 2 1 1.5 1.5 1 1 1.5 1 1
88108810
88118811# Config reset
88128812
0 commit comments