pub fn consider_head_key(
state: &mut SnapshotScanState,
snapshot: SnapshotId,
key: &[u8],
value: &[u8],
head_offset: usize,
graph_hops: usize,
g_window: GWindowKind,
graph_name: Option<&EncodedTerm>,
graph_filter_terms: &[EncodedTerm],
graph_filter_allow: bool,
iri_only_head: bool,
) -> Result<HeadVerdict, StorageError>Expand description
MVCC + optional G window for one versioned index key.
head_offset is the byte offset of the head term inside the logical key
(0 for bare axis head scans, the constraint prefix length for domain
scans). The verdict carries the head term’s byte range instead of a
decoded term: no candidate row pays a head decode here.
iri_only_head is the planner’s FILTER(isIRI(?head)) pushdown: the
head term must be a NamedNode, tested as one marker-byte check on both
paths.
Candidate = emit / count this key (the caller decides which);
Skip = Next() (future ts, Delete, G-reject, IRI-reject,
already-handled version).