brayanjuls commented on code in PR #15743: URL: https://github.com/apache/datafusion/pull/15743#discussion_r2048130471
########## datafusion/sql/tests/sql_integration.rs: ########## @@ -4673,16 +4675,17 @@ fn test_infer_types_from_predicate() { } #[test] -fn test_infer_types_from_between_predicate() { - let sql = "SELECT id, age FROM person WHERE age BETWEEN $1 AND $2"; +fn test_prepare_statement_infer_types_from_between_predicate() { + let sql = "PREPARE my_plan AS SELECT id, age FROM person WHERE age BETWEEN $1 AND $2"; let plan = logical_plan(sql).unwrap(); assert_snapshot!( plan, @r#" - Projection: person.id, person.age - Filter: person.age BETWEEN $1 AND $2 - TableScan: person + Prepare: "my_plan" [] Review Comment: Currently when the logical plan is created it does not include the type inferred, this result in some issues when we try to call the function `plan.with_param_values(param_values)` as it tries to [extract the type from the plan](https://github.com/apache/datafusion/blob/3e086643ec79a01bb9614f2a3ab2d580a011171c/datafusion/expr/src/logical_plan/plan.rs#L1278-L1284) but it is empty. Are we expecting the plan to contain the type at this time? if so probably there is another bug we need to investigate. -- 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