(location: &str, sql: &str)
| 551 | } |
| 552 | |
| 553 | async fn copy_to_table_test(location: &str, sql: &str) -> Result<()> { |
| 554 | let ctx = SessionContext::new(); |
| 555 | // AWS CONFIG register. |
| 556 | |
| 557 | let plan = ctx.state().create_logical_plan(sql).await?; |
| 558 | |
| 559 | if let LogicalPlan::Copy(cmd) = &plan { |
| 560 | let format = config_file_type_from_str(&cmd.file_type.get_ext()); |
| 561 | register_object_store_and_config_extensions( |
| 562 | &ctx, |
| 563 | &cmd.output_url, |
| 564 | &cmd.options, |
| 565 | format, |
| 566 | false, |
| 567 | ) |
| 568 | .await?; |
| 569 | } else { |
| 570 | return plan_err!("LogicalPlan is not a CreateExternalTable"); |
| 571 | } |
| 572 | |
| 573 | // Ensure the URL is supported by the object store |
| 574 | ctx.runtime_env() |
| 575 | .object_store(ListingTableUrl::parse(location)?)?; |
| 576 | |
| 577 | Ok(()) |
| 578 | } |
| 579 | |
| 580 | #[tokio::test] |
| 581 | async fn create_object_store_table_http() -> Result<()> { |
no test coverage detected
searching dependent graphs…