avantgardnerio commented on code in PR #5835:
URL: https://github.com/apache/arrow-datafusion/pull/5835#discussion_r1156108242
##########
datafusion/sql/tests/integration_test.rs:
##########
@@ -199,6 +199,36 @@ fn cast_to_invalid_decimal_type() {
}
}
+#[test]
+fn plan_create_table_with_pk() {
+ let sql = "create table person (id int, name string, primary key(id))";
+ let plan = r#"
+CreateMemoryTable: Bare { table: "person" } primary_key=[id]
+ EmptyRelation
+ "#
+ .trim();
+ quick_test(sql, plan);
+}
+
+#[test]
+fn plan_create_table_no_pk() {
+ let sql = "create table person (id int, name string)";
+ let plan = r#"
+CreateMemoryTable: Bare { table: "person" }
+ EmptyRelation
+ "#
+ .trim();
+ quick_test(sql, plan);
+}
+
+#[test]
+#[should_panic(expected = "Non-primary unique constraints are not supported")]
Review Comment:
Unhanded syntax causes errors.
--
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]