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

Function test_with_fetch_with_skip

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

Source from the content-addressed store, hash-verified

2372
2373 #[test]
2374 fn test_with_fetch_with_skip() {
2375 // Test with both skip and fetch
2376 let original_stats = Statistics {
2377 num_rows: Precision::Exact(1000),
2378 total_byte_size: Precision::Exact(8000),
2379 column_statistics: vec![col_stats_i64(10)],
2380 };
2381
2382 // Skip 200, fetch 300, so we get rows 200-500
2383 let result = original_stats
2384 .clone()
2385 .with_fetch(Some(300), 200, 1)
2386 .unwrap();
2387
2388 assert_eq!(result.num_rows, Precision::Exact(300));
2389 // Column 1: byte_size 800 * (300/500) = 240, Sum = 240
2390 assert_eq!(result.total_byte_size, Precision::Inexact(240));
2391 }
2392
2393 #[test]
2394 fn test_with_fetch_multi_partition() {

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…