()
| 2370 | |
| 2371 | #[tokio::test] |
| 2372 | async fn with_column_name() -> Result<()> { |
| 2373 | // define data with a column name that has a "." in it: |
| 2374 | let array: Int32Array = [1, 10].into_iter().collect(); |
| 2375 | let batch = RecordBatch::try_from_iter(vec![("f.c1", Arc::new(array) as _)])?; |
| 2376 | |
| 2377 | let ctx = SessionContext::new(); |
| 2378 | ctx.register_batch("t", batch)?; |
| 2379 | |
| 2380 | let df = ctx |
| 2381 | .table("t") |
| 2382 | .await? |
| 2383 | // try and create a column with a '.' in it |
| 2384 | .with_column("f.c2", lit("hello"))?; |
| 2385 | |
| 2386 | let df_results = df.collect().await?; |
| 2387 | |
| 2388 | assert_snapshot!( |
| 2389 | batches_to_sort_string(&df_results), |
| 2390 | @r" |
| 2391 | +------+-------+ |
| 2392 | | f.c1 | f.c2 | |
| 2393 | +------+-------+ |
| 2394 | | 1 | hello | |
| 2395 | | 10 | hello | |
| 2396 | +------+-------+ |
| 2397 | " |
| 2398 | ); |
| 2399 | |
| 2400 | Ok(()) |
| 2401 | } |
| 2402 | |
| 2403 | #[tokio::test] |
| 2404 | async fn test_cache_mismatch() -> Result<()> { |
nothing calls this directly
no test coverage detected
searching dependent graphs…