Skip to main content

Module slice

Module slice 

Source
Expand description

Coordinate-range slice over a sparse tile.

A Slice carries one optional DimRange per schema dimension (None = unconstrained). Bounds are typed DomainBounds so the filter dispatches by dim type without re-parsing.

Two entry points:

  • tile_overlaps_slice — cheap MBR-only check; the query executor calls this against each segment tile entry to skip non-overlapping tiles before any payload decode.
  • slice_sparse — per-cell filter, returns a new SparseTile containing only the surviving cells (preserving column order).

Structs§

DimRange
Inclusive-by-default closed range on one dim. lo/hi variants must match the dim’s type — mismatches are silently treated as “does not intersect” (the cell drops out).
Slice
Slice predicate. dim_ranges.len() must equal schema.arity().

Functions§

slice_sparse
Filter cells in tile to those whose coords pass every dim range. Result is a freshly-built SparseTile — dictionaries shrink to surviving values, MBR/attr_stats are recomputed.
tile_overlaps_slice
True if a tile’s per-dim MBR overlaps every constrained dim range. An empty dim_ranges (no constraints) trivially overlaps.