Creates a file source for this table
(&self)
| 321 | |
| 322 | /// Creates a file source for this table |
| 323 | fn create_file_source(&self) -> Arc<dyn FileSource> { |
| 324 | let table_schema = TableSchema::new( |
| 325 | Arc::clone(&self.file_schema), |
| 326 | self.options |
| 327 | .table_partition_cols |
| 328 | .iter() |
| 329 | .map(|(col, field)| Arc::new(Field::new(col, field.clone(), false))) |
| 330 | .collect(), |
| 331 | ); |
| 332 | |
| 333 | self.options.format.file_source(table_schema) |
| 334 | } |
| 335 | |
| 336 | /// Creates output ordering from user-specified file_sort_order or derives |
| 337 | /// from file orderings when user doesn't specify. |
no test coverage detected