()
| 69 | |
| 70 | #[tokio::test] |
| 71 | async fn create_drop_table() -> Result<()> { |
| 72 | let ctx = SessionContext::new(); |
| 73 | |
| 74 | let sql = "CREATE TABLE dt (a_id integer, a_str string, a_bool boolean);"; |
| 75 | ctx.sql(sql).await.unwrap(); |
| 76 | |
| 77 | let cat = ctx.catalog("datafusion").unwrap(); |
| 78 | let schema = cat.schema("public").unwrap(); |
| 79 | |
| 80 | let exists = schema.table_exist("dt"); |
| 81 | assert!(exists, "Table should have been created!"); |
| 82 | |
| 83 | // Drop the table |
| 84 | let sql = "DROP TABLE dt;"; |
| 85 | ctx.sql(sql).await.unwrap(); |
| 86 | |
| 87 | let exists = schema.table_exist("dt"); |
| 88 | assert!(!exists, "Table should have been dropped!"); |
| 89 | |
| 90 | Ok(()) |
| 91 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…