HaoYang670 commented on code in PR #5640:
URL: https://github.com/apache/arrow-datafusion/pull/5640#discussion_r1141345606


##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -632,16 +632,16 @@ impl LogicalPlan {
     /// params_values
     pub fn replace_params_with_values(
         &self,
-        param_values: &Vec<ScalarValue>,
+        param_values: &[ScalarValue],
     ) -> Result<LogicalPlan, DataFusionError> {
         let exprs = self.expressions();
-        let mut new_exprs = vec![];
+        let mut new_exprs = Vec::with_capacity(exprs.len());
         for expr in exprs {
             new_exprs.push(Self::replace_placeholders_with_values(expr, 
param_values)?);
         }

Review Comment:
   Nice catching @alamb ! I've updated the code, please review.



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to