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

Method num_partitions

datafusion/datasource/src/file_stream/mod.rs:1555–1562  ·  view source on GitHub ↗

Returns the number of configured partitions, including empty ones that appear only in the explicit read schedule.

(&self)

Source from the content-addressed store, hash-verified

1553 /// Returns the number of configured partitions, including empty ones
1554 /// that appear only in the explicit read schedule.
1555 fn num_partitions(&self) -> usize {
1556 self.partition_files
1557 .keys()
1558 .map(|partition| partition.0 + 1)
1559 .chain(self.reads.iter().map(|partition| partition.0 + 1))
1560 .max()
1561 .unwrap_or(1)
1562 }
1563
1564 /// Builds a `FileScanConfig` covering every configured partition.
1565 fn test_config(&self) -> FileScanConfig {

Callers 2

runMethod · 0.45
test_configMethod · 0.45

Calls 3

maxMethod · 0.45
mapMethod · 0.45
iterMethod · 0.45

Tested by 1

test_configMethod · 0.36