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


##########
datafusion/sql/tests/sql_integration.rs:
##########
@@ -3388,26 +3389,15 @@ fn 
ident_normalization_parser_options_ident_normalization() -> ParserOptions {
     }
 }
 
-fn prepare_stmt_quick_test(
-    sql: &str,
-    expected_plan: &str,
-    expected_data_types: &str,
-) -> LogicalPlan {
+fn generate_prepare_stmt_and_data_types(sql: &str) -> (LogicalPlan, String) {

Review Comment:
   I like what you have here 👍 



##########
datafusion/sql/tests/sql_integration.rs:
##########
@@ -4665,18 +4674,18 @@ Projection: person.id, person.age
 }
 
 #[test]
-fn test_prepare_statement_infer_types_from_between_predicate() {
+fn test_infer_types_from_between_predicate() {
     let sql = "SELECT id, age FROM person WHERE age BETWEEN $1 AND $2";
 
-    let expected_plan = r#"
-Projection: person.id, person.age
-  Filter: person.age BETWEEN $1 AND $2
-    TableScan: person
-        "#
-    .trim();
-
-    let expected_dt = "[Int32]";

Review Comment:
   This makes sense -- thank you 
   
   I actually looks to me like it is a mistake in the test 🤔 
   
   Perhaps the test should be something like 
   
   ```rust
       let sql = "PREPARE SELECT id, age FROM person WHERE age BETWEEN $1 AND 
$2";
   ```
   
   Instead of 
   ```rust
       let sql = "SELECT id, age FROM person WHERE age BETWEEN $1 AND $2";
   ```
   
   (maybe we can fix this in a follow on PR -- I will file a ticket)



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