NGA-TRAN commented on code in PR #4490:
URL: https://github.com/apache/arrow-datafusion/pull/4490#discussion_r1038585496


##########
datafusion/sql/src/planner.rs:
##########
@@ -5992,6 +6011,20 @@ mod tests {
         quick_test(sql, expected);
     }
 
+    // TODO: will ad more tests to cover maby other cases
+    #[test]
+    fn test_prepare_statement_to_plan() {
+        let sql = "PREPARE my_plan(INT) AS SELECT id, age  FROM person WHERE 
age = $1";
+        //let statements = DFParser::parse_sql(sql).unwrap();
+
+        let expected = "Prepare: \"my_plan\" [Int32] \
+        \n  Projection: person.id, person.age\
+        \n    Filter: person.age = $1\
+        \n      TableScan: person";
+
+        quick_test(sql, expected);
+    }
+

Review Comment:
   This is the only test for now. I will add more tests



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

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

Reply via email to