goldmedal commented on code in PR #12133:
URL: https://github.com/apache/datafusion/pull/12133#discussion_r1729695268


##########
datafusion/functions-aggregate/src/approx_percentile_cont.rs:
##########
@@ -154,19 +154,20 @@ fn get_scalar_value(expr: &Arc<dyn PhysicalExpr>) -> 
Result<ScalarValue> {
 }
 
 fn validate_input_percentile_expr(expr: &Arc<dyn PhysicalExpr>) -> Result<f64> 
{
-    let percentile = match get_scalar_value(expr)? {
-        ScalarValue::Float32(Some(value)) => {
+    let percentile = match get_scalar_value(expr).ok() {

Review Comment:
   It looks nice. Thanks for the suggestions!



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