pub struct GeoCandidateState { /* private fields */ }Expand description
State machine for one GeoCandidateScan stream: MVCC collapse per logical
(cell, term) key and a DISTINCT seen-set over full term bytes.
The seen-set exists because one polygon files postings under up to
max_cells cell ids that are NOT adjacent in cell-major order; DomainScan
run-collapse does not apply, and duplicate ?g rows would multiply the
SPARQL bag on the join build side. The set keys on the full term bytes
(wire encoding) — hashing only picks buckets, equality compares the whole
term, so a hash collision can never drop a geometry. Never replace this
with a hash(term) as u64 identity or a Bloom filter.
Implementations§
Source§impl GeoCandidateState
impl GeoCandidateState
Sourcepub fn consider_posting(
&mut self,
key: &[u8],
commit_ts: CommitTs,
op: StorageOp,
snapshot: SnapshotId,
envelope: Option<&GeoEnvelope>,
query_envelope: Option<&GeoEnvelope>,
) -> Result<GeoCandidateDecision, StorageError>
pub fn consider_posting( &mut self, key: &[u8], commit_ts: CommitTs, op: StorageOp, snapshot: SnapshotId, envelope: Option<&GeoEnvelope>, query_envelope: Option<&GeoEnvelope>, ) -> Result<GeoCandidateDecision, StorageError>
Decide one visible posting row for a stream at snapshot.
envelope is the decoded optional value envelope (None = absent) and
query_envelope the constant geometry’s CRS84 box — when both are
present and neither spans the antimeridian, a padded-disjoint row is
skipped before it can reach compute’s Relate.