avantgardnerio commented on code in PR #4902:
URL: https://github.com/apache/arrow-datafusion/pull/4902#discussion_r1071544305


##########
datafusion/sql/tests/integration_test.rs:
##########
@@ -157,6 +157,44 @@ fn cast_to_invalid_decimal_type() {
     }
 }
 
+#[test]
+fn plan_insert() {
+    let sql =
+        "insert into person (id, first_name, last_name) values (1, 'Alan', 
'Turing')";
+    let plan = r#"
+Write: op=[Insert] table=[person]
+  Projection: column1 AS id, column2 AS first_name, column3 AS last_name
+    Values: (Int64(1), Utf8("Alan"), Utf8("Turing"))
+    "#
+    .trim();
+    quick_test(sql, plan);
+}
+
+#[test]
+fn plan_update() {
+    let sql = "update person set last_name='Kay' where id=1";
+    let plan = r#"
+Write: op=[Update] table=[person]
+  Projection: person.age AS age, person.birth_date AS birth_date, 
person.first_name AS first_name, person.id AS id, Utf8("Kay") AS last_name, 
person.salary AS salary, person.state AS state, person.😀 AS 😀
+    Filter: id = Int64(1)
+      TableScan: person
+      "#
+    .trim();
+    quick_test(sql, plan);
+}
+
+#[test]
+fn plan_delete() {
+    let sql = "delete from person where id=1";
+    let plan = r#"
+Write: op=[Delete] table=[person]
+  Filter: id = Int64(1)

Review Comment:
   No projection needed for delete I assume?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to