Compute the [`TileId`] for one cell coordinate at a given system time. Non-bitemporal callers pass `system_from_ms = 0`; bitemporal writes supply the leader-stamped HLC component.
(
schema: &ArraySchema,
coord: &[CoordValue],
system_from_ms: i64,
)
| 71 | /// time. Non-bitemporal callers pass `system_from_ms = 0`; bitemporal |
| 72 | /// writes supply the leader-stamped HLC component. |
| 73 | pub fn tile_id_for_cell( |
| 74 | schema: &ArraySchema, |
| 75 | coord: &[CoordValue], |
| 76 | system_from_ms: i64, |
| 77 | ) -> ArrayResult<TileId> { |
| 78 | let tile_indices = tile_indices_for_cell(schema, coord)?; |
| 79 | let bits = bits_per_dim(schema.arity()); |
| 80 | let prefix = encode_tile_prefix_with_order(schema, &tile_indices, bits)?; |
| 81 | Ok(TileId::new(prefix, system_from_ms)) |
| 82 | } |
| 83 | |
| 84 | fn out_of_domain<T>(schema: &ArraySchema, dim: &str, detail: &str) -> ArrayResult<T> { |
| 85 | Err(ArrayError::CoordOutOfDomain { |