MCPcopy Create free account
hub / github.com/apache/datafusion / repartitioned

Method repartitioned

datafusion/datasource/src/source.rs:365–385  ·  view source on GitHub ↗

Implementation of [`ExecutionPlan::repartitioned`] which relies upon the inner [`DataSource::repartitioned`]. If the data source does not support changing its partitioning, returns `Ok(None)` (the default). Refer to [`ExecutionPlan::repartitioned`] for more details.

(
        &self,
        target_partitions: usize,
        config: &ConfigOptions,
    )

Source from the content-addressed store, hash-verified

363 /// If the data source does not support changing its partitioning, returns `Ok(None)` (the default). Refer
364 /// to [`ExecutionPlan::repartitioned`] for more details.
365 fn repartitioned(
366 &self,
367 target_partitions: usize,
368 config: &ConfigOptions,
369 ) -> Result<Option<Arc<dyn ExecutionPlan>>> {
370 let data_source = self.data_source.repartitioned(
371 target_partitions,
372 config.optimizer.repartition_file_min_size,
373 self.properties().eq_properties.output_ordering(),
374 )?;
375
376 Ok(data_source.map(|source| {
377 let output_partitioning = source.output_partitioning();
378 let plan = self
379 .clone()
380 .with_data_source(source)
381 // Changing source partitioning may invalidate output partitioning. Update it also
382 .with_partitioning(output_partitioning);
383 Arc::new(plan) as _
384 }))
385 }
386
387 fn execute(
388 &self,

Callers

nothing calls this directly

Calls 8

newFunction · 0.85
with_data_sourceMethod · 0.80
output_orderingMethod · 0.45
propertiesMethod · 0.45
mapMethod · 0.45
output_partitioningMethod · 0.45
with_partitioningMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected