Create a new `MemorySourceConfig` for reading in-memory record batches The provided `schema` should not have the projection applied.
(
partitions: &[Vec<RecordBatch>],
schema: SchemaRef,
projection: Option<Vec<usize>>,
)
| 262 | /// Create a new `MemorySourceConfig` for reading in-memory record batches |
| 263 | /// The provided `schema` should not have the projection applied. |
| 264 | pub fn try_new( |
| 265 | partitions: &[Vec<RecordBatch>], |
| 266 | schema: SchemaRef, |
| 267 | projection: Option<Vec<usize>>, |
| 268 | ) -> Result<Self> { |
| 269 | let projected_schema = project_schema(&schema, projection.as_ref())?; |
| 270 | Ok(Self { |
| 271 | partitions: partitions.to_vec(), |
| 272 | schema, |
| 273 | projected_schema, |
| 274 | projection, |
| 275 | sort_information: vec![], |
| 276 | show_sizes: true, |
| 277 | fetch: None, |
| 278 | }) |
| 279 | } |
| 280 | |
| 281 | /// Create a new `DataSourceExec` plan for reading in-memory record batches |
| 282 | /// The provided `schema` should not have the projection applied. |
nothing calls this directly
no test coverage detected