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

Function test_with_fetch_skip_all_rows

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

Source from the content-addressed store, hash-verified

2324
2325 #[test]
2326 fn test_with_fetch_skip_all_rows() {
2327 // Test when skip >= num_rows (all rows are skipped)
2328 let original_stats = Statistics {
2329 num_rows: Precision::Exact(100),
2330 total_byte_size: Precision::Exact(800),
2331 column_statistics: vec![col_stats_i64(10)],
2332 };
2333
2334 let result = original_stats.clone().with_fetch(Some(50), 100, 1).unwrap();
2335
2336 assert_eq!(result.num_rows, Precision::Exact(0));
2337 // When ratio is 0/100 = 0, byte size should be 0
2338 assert_eq!(result.total_byte_size, Precision::Inexact(0));
2339 }
2340
2341 #[test]
2342 fn test_with_fetch_skip_all_rows_inexact() {

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…