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


##########
datafusion/sqllogictest/test_files/aggregate.slt:
##########
@@ -129,6 +129,14 @@ CREATE TABLE group_median_table_nullable (
 # Error tests
 #######
 
+statement error ORDER BY must be specified using WITHIN GROUP
+select quantile_cont(col0, 0.75 order by col0)
+from values (1, 3), (2, 2), (3, 1) t(col0, col1);
+
+statement error ORDER BY must be specified using WITHIN GROUP

Review Comment:
   I double checked and I agree with you
   ```sql
   andrewlamb@Andrews-MacBook-Pro-3:~/Software/influxdb_pro/ent$ datafusion-cli
   DataFusion CLI v52.1.0
   > select quantile_cont(col0, 0.75 order by col0)
   from values (1, 3), (2, 2), (3, 1) t(col0, col1);
   +-------------------------------------+
   | quantile_cont(t.col0,Float64(0.75)) |
   +-------------------------------------+
   | 2.5                                 |
   +-------------------------------------+
   1 row(s) fetched.
   Elapsed 0.002 seconds.
   ```
   
   In general, rather than disallow this syntax, is there some way we can 
support both syntaxes? I also have no idea how often they are used but if it is 
currently supported and produces the correct result, then I suspect at least 
some users would treat them starting to error as a regression 🤔 
   



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