()
| 639 | |
| 640 | #[tokio::test] |
| 641 | async fn test_json_array_empty() -> Result<()> { |
| 642 | // Test empty JSON array |
| 643 | let json_data = "[]"; |
| 644 | |
| 645 | let store = Arc::new(InMemory::new()); |
| 646 | let path = Path::from("empty.json"); |
| 647 | store |
| 648 | .put(&path, PutPayload::from_static(json_data.as_bytes())) |
| 649 | .await?; |
| 650 | |
| 651 | let opener = JsonOpener::new( |
| 652 | 1024, |
| 653 | test_schema(), |
| 654 | FileCompressionType::UNCOMPRESSED, |
| 655 | store.clone(), |
| 656 | false, |
| 657 | ); |
| 658 | |
| 659 | let meta = store.head(&path).await?; |
| 660 | let file = PartitionedFile::new(path.to_string(), meta.size); |
| 661 | |
| 662 | let stream = opener.open(file)?.await?; |
| 663 | let batches: Vec<_> = stream.try_collect().await?; |
| 664 | |
| 665 | let total_rows: usize = batches.iter().map(|b| b.num_rows()).sum(); |
| 666 | assert_eq!(total_rows, 0); |
| 667 | |
| 668 | Ok(()) |
| 669 | } |
| 670 | |
| 671 | #[tokio::test] |
| 672 | async fn test_json_array_range_not_supported() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…