| 275 | |
| 276 | #[test] |
| 277 | fn tombstone_rows_roundtrip() { |
| 278 | let s = schema(); |
| 279 | let mut b = SparseTileBuilder::new(&s); |
| 280 | for i in 0..20 { |
| 281 | b.push_row(SparseRow { |
| 282 | coord: &[CoordValue::Int64(i)], |
| 283 | attrs: &[CellValue::Int64(i)], |
| 284 | surrogate: Surrogate::ZERO, |
| 285 | valid_from_ms: 0, |
| 286 | valid_until_ms: OPEN_UPPER, |
| 287 | kind: RowKind::Live, |
| 288 | }) |
| 289 | .unwrap(); |
| 290 | } |
| 291 | b.push_row(SparseRow { |
| 292 | coord: &[CoordValue::Int64(99)], |
| 293 | attrs: &[], |
| 294 | surrogate: Surrogate::ZERO, |
| 295 | valid_from_ms: 0, |
| 296 | valid_until_ms: OPEN_UPPER, |
| 297 | kind: RowKind::Tombstone, |
| 298 | }) |
| 299 | .unwrap(); |
| 300 | let tile = b.build(); |
| 301 | let out = roundtrip(&tile); |
| 302 | assert_eq!(out.row_kinds, tile.row_kinds); |
| 303 | } |
| 304 | |
| 305 | #[test] |
| 306 | fn invalid_version_returns_error() { |