2010YOUY01 commented on code in PR #18837:
URL: https://github.com/apache/datafusion/pull/18837#discussion_r2545041680


##########
datafusion/functions-aggregate/src/percentile_cont.rs:
##########
@@ -760,3 +914,80 @@ fn calculate_percentile<T: ArrowNumericType>(
         }
     }
 }
+
+#[cfg(test)]
+mod tests {

Review Comment:
   I suggest to add some tests in `sqllogictest` 
https://github.com/apache/datafusion/tree/main/datafusion/sqllogictest
   
   It should run some SQL queries that this optimization is applicable, and we 
first ensure the result is expected, and also do a `EXPLAIN` to ensure such 
optimization is applied.
   
   In fact, we can move most of the test coverage to sqllogictests, instead of 
unit tests here. The reason is:
   1. SQL tests are simpler to maintain
   2. The SQL interface is more stable, while internal APIs may change 
frequently. As a result, good test coverage here can easily get lost during 
refactoring.



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