()
| 2434 | |
| 2435 | #[test] |
| 2436 | fn test_with_fetch_fetch_exceeds_rows() { |
| 2437 | // Test when fetch is larger than available rows after skip |
| 2438 | let original_stats = Statistics { |
| 2439 | num_rows: Precision::Exact(100), |
| 2440 | total_byte_size: Precision::Exact(800), |
| 2441 | column_statistics: vec![col_stats_i64(10)], |
| 2442 | }; |
| 2443 | |
| 2444 | // Skip 50, fetch 100, but only 50 rows remain |
| 2445 | let result = original_stats.clone().with_fetch(Some(100), 50, 1).unwrap(); |
| 2446 | |
| 2447 | assert_eq!(result.num_rows, Precision::Exact(50)); |
| 2448 | // 50/100 = 0.5, so 800 * 0.5 = 400 |
| 2449 | assert_eq!(result.total_byte_size, Precision::Inexact(400)); |
| 2450 | } |
| 2451 | |
| 2452 | #[test] |
| 2453 | fn test_with_fetch_preserves_all_column_stats() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…