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


##########
datafusion/core/src/execution/context/mod.rs:
##########
@@ -1269,10 +1271,14 @@ impl SessionContext {
             exec_datafusion_err!("Prepared statement '{}' does not exist", 
name)
         })?;
 
+        let state = self.state.read();
+        let context = SimplifyContext::new(state.execution_props());
+        let simplifier = ExprSimplifier::new(context);
+
         // Only allow literals as parameters for now.
         let mut params: Vec<ScalarAndMetadata> = parameters
             .into_iter()
-            .map(|e| match e {
+            .map(|e| match simplifier.simplify(e.clone())? {

Review Comment:
   I don't think we need to clone here (the expr was already owned)



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