Scan an empty data source with configured partition, mainly used in tests.
(
name: Option<&str>,
table_schema: &Schema,
projection: Option<Vec<usize>>,
partitions: usize,
)
| 76 | |
| 77 | /// Scan an empty data source with configured partition, mainly used in tests. |
| 78 | pub fn scan_empty_with_partitions( |
| 79 | name: Option<&str>, |
| 80 | table_schema: &Schema, |
| 81 | projection: Option<Vec<usize>>, |
| 82 | partitions: usize, |
| 83 | ) -> Result<LogicalPlanBuilder> { |
| 84 | let table_schema = Arc::new(table_schema.clone()); |
| 85 | let provider = Arc::new(EmptyTable::new(table_schema).with_partitions(partitions)); |
| 86 | let name = TableReference::bare(name.unwrap_or(UNNAMED_TABLE)); |
| 87 | LogicalPlanBuilder::scan(name, provider_as_source(provider), projection) |
| 88 | } |
| 89 | |
| 90 | /// Get the schema for the aggregate_test_* csv files |
| 91 | pub fn aggr_test_schema() -> SchemaRef { |
searching dependent graphs…