()
| 2519 | |
| 2520 | #[tokio::test] |
| 2521 | async fn test_dynamic_file_query() -> Result<()> { |
| 2522 | let path = PathBuf::from(env!("CARGO_MANIFEST_DIR")); |
| 2523 | let path = path.join("tests/tpch-csv/customer.csv"); |
| 2524 | let url = format!("file://{}", path.display()); |
| 2525 | let cfg = SessionConfig::new(); |
| 2526 | let session_state = SessionStateBuilder::new() |
| 2527 | .with_default_features() |
| 2528 | .with_config(cfg) |
| 2529 | .build(); |
| 2530 | let ctx = SessionContext::new_with_state(session_state).enable_url_table(); |
| 2531 | let result = plan_and_collect( |
| 2532 | &ctx, |
| 2533 | format!("select c_name from '{}' limit 3;", &url).as_str(), |
| 2534 | ) |
| 2535 | .await?; |
| 2536 | |
| 2537 | let actual = arrow::util::pretty::pretty_format_batches(&result) |
| 2538 | .unwrap() |
| 2539 | .to_string(); |
| 2540 | assert_snapshot!(actual, @r" |
| 2541 | +--------------------+ |
| 2542 | | c_name | |
| 2543 | +--------------------+ |
| 2544 | | Customer#000000002 | |
| 2545 | | Customer#000000003 | |
| 2546 | | Customer#000000004 | |
| 2547 | +--------------------+ |
| 2548 | "); |
| 2549 | |
| 2550 | Ok(()) |
| 2551 | } |
| 2552 | |
| 2553 | #[tokio::test] |
| 2554 | async fn custom_query_planner() -> Result<()> { |
nothing calls this directly
no test coverage detected
searching dependent graphs…