Garamda commented on code in PR #13511: URL: https://github.com/apache/datafusion/pull/13511#discussion_r1938232489
########## datafusion/sqllogictest/test_files/aggregate.slt: ########## @@ -1623,27 +1637,45 @@ b NULL NULL 7732.315789473684 # csv_query_approx_percentile_cont_with_weight query TI -SELECT c1, approx_percentile_cont(c3, 0.95) AS c3_p95 FROM aggregate_test_100 GROUP BY 1 ORDER BY 1 +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 ---- a 73 b 68 c 122 d 124 e 115 +query TI +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 +---- +a -101 +b -114 +c -109 +d -98 +e -93 Review Comment: `ORDER BY DESC` case is added, because the original function was fixed to only ascending order. [Same case](https://github.com/apache/datafusion/pull/13511/files#diff-a60d69cf923e18b0532e7ba3470c4b728e6b00230b3ea242f3fbe95e899c5ffeR1668-R1674) for `approx_percentile_cont_with_weight` is added. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org