()
| 22 | |
| 23 | #[tokio::test] |
| 24 | async fn create_custom_table() -> Result<()> { |
| 25 | let mut state = SessionStateBuilder::new().with_default_features().build(); |
| 26 | state |
| 27 | .table_factories_mut() |
| 28 | .insert("DELTATABLE".to_string(), Arc::new(TestTableFactory {})); |
| 29 | let ctx = SessionContext::new_with_state(state); |
| 30 | |
| 31 | let sql = "CREATE EXTERNAL TABLE dt STORED AS DELTATABLE LOCATION 's3://bucket/schema/table';"; |
| 32 | ctx.sql(sql).await.unwrap(); |
| 33 | |
| 34 | let cat = ctx.catalog("datafusion").unwrap(); |
| 35 | let schema = cat.schema("public").unwrap(); |
| 36 | let exists = schema.table_exist("dt"); |
| 37 | assert!(exists, "Table should have been created!"); |
| 38 | |
| 39 | Ok(()) |
| 40 | } |
| 41 | |
| 42 | #[tokio::test] |
| 43 | async fn create_external_table_with_ddl() -> Result<()> { |
nothing calls this directly
no test coverage detected
searching dependent graphs…