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


##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -1507,6 +1515,9 @@ impl LogicalPlan {
                             (_, Some(dt)) => {
                                 param_types.insert(id.clone(), 
Some(dt.clone()));
                             }
+                            (Some(Some(_)), None) => {
+                                // we have already inferred the datatype

Review Comment:
   This happens because we earlier treated LIMIT specially. We added it to the 
`param_types` but when we get to the Placeholder expression here, we see that 
the type was never inferred. If we weren't in an immutable method, we could do 
the actual type inference above instead of directly populating `param_types` 
and let it be appropriately populated here. 



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