()
| 668 | |
| 669 | #[tokio::test] |
| 670 | async fn test_insert_from_empty_table() -> Result<()> { |
| 671 | // Create a new schema with one field called "a" of type Int32 |
| 672 | let schema = Arc::new(Schema::new(vec![Field::new("a", DataType::Int32, false)])); |
| 673 | |
| 674 | // Create a new batch of data to insert into the table |
| 675 | let batch = RecordBatch::try_new( |
| 676 | schema.clone(), |
| 677 | vec![Arc::new(Int32Array::from(vec![1, 2, 3]))], |
| 678 | )?; |
| 679 | // Run the experiment and obtain the resulting data in the table |
| 680 | let resulting_data_in_table = experiment( |
| 681 | schema, |
| 682 | vec![vec![batch.clone(), batch.clone()]], |
| 683 | vec![vec![]], |
| 684 | ) |
| 685 | .await?; |
| 686 | // Ensure that the table now contains two batches of data in the same partition |
| 687 | assert_eq!(resulting_data_in_table[0].len(), 2); |
| 688 | Ok(()) |
| 689 | } |
| 690 | } |
nothing calls this directly
no test coverage detected