Ted-Jiang commented on code in PR #3146:
URL: https://github.com/apache/arrow-datafusion/pull/3146#discussion_r947665790


##########
datafusion/core/tests/sql/aggregates.rs:
##########
@@ -925,6 +925,54 @@ async fn csv_query_approx_percentile_cont_with_weight() -> 
Result<()> {
     Ok(())
 }
 
+#[tokio::test]
+async fn csv_query_approx_percentile_cont_with_histogram_bins() -> Result<()> {
+    let ctx = SessionContext::new();
+    register_aggregate_csv(&ctx).await?;
+
+    // compare approx_percentile_cont and approx_percentile_cont_with_weight
+    let sql = "SELECT c1, approx_percentile_cont(c3, 0.95, 200) AS c3_p95 FROM 
aggregate_test_100 GROUP BY 1 ORDER BY 1";
+    let actual = execute_to_batches(&ctx, sql).await;
+    let expected = vec![
+        "+----+--------+",

Review Comment:
   @alamb Thanks for your review 😊
   this sql should have with the same result as 
   `SELECT c1, approx_percentile_cont(c3, 0.95) AS c3_p95 FROM 
aggregate_test_100 GROUP BY 1 ORDER BY 1`
   in line 867



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to