alamb commented on code in PR #17780:
URL: https://github.com/apache/datafusion/pull/17780#discussion_r2382950752


##########
datafusion/sqllogictest/test_files/aggregate.slt:
##########
@@ -1540,6 +1540,19 @@ SELECT APPROX_PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER 
BY v) FROM (VALUES (CAST(
 ----
 NULL
 
+# percentile_cont_with_weight_with_nulls
+query I
+SELECT APPROX_PERCENTILE_CONT_WITH_WEIGHT(w, 0.5) WITHIN GROUP (ORDER BY v)

Review Comment:
   I verified these queries get different answers on main:
   
   ```sql
   
   > SELECT APPROX_PERCENTILE_CONT_WITH_WEIGHT(w, 0.5) WITHIN GROUP (ORDER BY v)
   FROM (VALUES (1, 1), (2, 1), (3, 1), (4, NULL), (NULL, 1), (NULL, NULL)) as 
t (v, w);
   
+----------------------------------------------------------------------------------------+
   | approx_percentile_cont_with_weight(t.w,Float64(0.5)) WITHIN GROUP [t.v ASC 
NULLS LAST] |
   
+----------------------------------------------------------------------------------------+
   | 0                                                                          
            |
   
+----------------------------------------------------------------------------------------+
   1 row(s) fetched.
   Elapsed 0.031 seconds.
   
   > SELECT APPROX_PERCENTILE_CONT_WITH_WEIGHT(1, 0.5) WITHIN GROUP (ORDER BY 
v) FROM (VALUES (CAST(NULL as INT))) as t (v);
   
   
+---------------------------------------------------------------------------------------------+
   | approx_percentile_cont_with_weight(Int64(1),Float64(0.5)) WITHIN GROUP 
[t.v ASC NULLS LAST] |
   
+---------------------------------------------------------------------------------------------+
   | 0                                                                          
                 |
   
+---------------------------------------------------------------------------------------------+
   1 row(s) fetched.
   Elapsed 0.004 seconds.
   ```
   
   Thanks @Jefffrey 



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to