Builds a `FileScanConfig` covering every configured partition.
(&self)
| 1563 | |
| 1564 | /// Builds a `FileScanConfig` covering every configured partition. |
| 1565 | fn test_config(&self) -> FileScanConfig { |
| 1566 | let file_groups = (0..self.num_partitions()) |
| 1567 | .map(|partition| { |
| 1568 | self.partition_files |
| 1569 | .get(&PartitionId(partition)) |
| 1570 | .into_iter() |
| 1571 | .flat_map(|files| files.iter()) |
| 1572 | .map(|name| PartitionedFile::new(name, 10)) |
| 1573 | .collect::<Vec<_>>() |
| 1574 | .into() |
| 1575 | }) |
| 1576 | .collect::<Vec<_>>(); |
| 1577 | |
| 1578 | let table_schema = TableSchema::new( |
| 1579 | Arc::new(Schema::new(vec![Field::new("i", DataType::Int32, false)])), |
| 1580 | vec![], |
| 1581 | ); |
| 1582 | FileScanConfigBuilder::new( |
| 1583 | ObjectStoreUrl::parse("test:///").unwrap(), |
| 1584 | Arc::new(MockSource::new(table_schema)), |
| 1585 | ) |
| 1586 | .with_file_groups(file_groups) |
| 1587 | .with_limit(self.limit) |
| 1588 | .with_preserve_order(self.preserve_order) |
| 1589 | .with_partitioned_by_file_group(self.partitioned_by_file_group) |
| 1590 | .build() |
| 1591 | } |
| 1592 | } |
| 1593 | |
| 1594 | /// Formats one stream poll result into a stable snapshot line. |
no test coverage detected