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

Function test_with_fetch_multi_partition

datafusion/common/src/stats.rs:2394–2408  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2392
2393 #[test]
2394 fn test_with_fetch_multi_partition() {
2395 // Test with multiple partitions
2396 let original_stats = Statistics {
2397 num_rows: Precision::Exact(1000), // per partition
2398 total_byte_size: Precision::Exact(8000),
2399 column_statistics: vec![col_stats_i64(10)],
2400 };
2401
2402 // Fetch 100 per partition, 4 partitions = 400 total
2403 let result = original_stats.clone().with_fetch(Some(100), 0, 4).unwrap();
2404
2405 assert_eq!(result.num_rows, Precision::Exact(400));
2406 // Column 1: byte_size 800 * 0.4 = 320, Sum = 320
2407 assert_eq!(result.total_byte_size, Precision::Inexact(320));
2408 }
2409
2410 #[test]
2411 fn test_with_fetch_absent_stats() {

Callers

nothing calls this directly

Calls 2

with_fetchMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…