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


##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -1494,6 +1494,14 @@ impl LogicalPlan {
         let mut param_types: HashMap<String, Option<DataType>> = 
HashMap::new();
 
         self.apply_with_subqueries(|plan| {
+            if let LogicalPlan::Limit(Limit { fetch: Some(e), .. }) = plan {

Review Comment:
   What concerns me about the code is that code for inferring data type has a 
special case for `LIMIT` but from what I know `LIMIT` doesn't have any special 
behavior for parameters
   
   If we need a schema to infer types for `LIMIT` we could either 
   1. Use its `input` plan (though all schema would be ignored)
   2. Use `Schema::empty()` perhaps
   
   Does that make sense?



-- 
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...@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to