()
| 443 | |
| 444 | #[test] |
| 445 | fn read_float64_with_nulls() { |
| 446 | let segment = write_test_segment(100); |
| 447 | let reader = SegmentReader::open(&segment).expect("open"); |
| 448 | |
| 449 | let col = reader.read_column(2).expect("read score column"); |
| 450 | // Score column uses AlpFastLanesLz4 → decoded as Float64. |
| 451 | let (values, valid) = match &col { |
| 452 | DecodedColumn::Float64 { values, valid } => (values.as_slice(), valid.as_slice()), |
| 453 | other => panic!("expected Float64, got {other:?}"), |
| 454 | }; |
| 455 | |
| 456 | // Float64 column: every 5th row is null (rows 0,5,10,...,95 = 20 nulls). |
| 457 | assert_eq!(valid.len(), 100); |
| 458 | let null_count = valid.iter().filter(|&&v| !v).count(); |
| 459 | assert_eq!(null_count, 20); |
| 460 | |
| 461 | // Row 1: score = 1 * 0.5 = 0.5 |
| 462 | assert!(valid[1]); |
| 463 | assert!((values[1] - 0.5).abs() < 0.001); |
| 464 | } |
| 465 | |
| 466 | #[test] |
| 467 | fn predicate_pushdown_skips_blocks() { |
nothing calls this directly
no test coverage detected