Context
value_to_otype_okey (fluree-db-query/src/binary_scan.rs) resolves big numerics against the per-(graph, predicate) NumBig arena when given a numbig_ctx: Option<(GraphId, u32)>. The overlay-translation caller passes the context; the two bound-object prefilter callers pass None:
- the bound-object scan prefilter (
encode_bound_object_prefilter)
- the batched-join bound-object encode path
So a query constant like ?s ex:budget 19.99 (typed xsd:decimal) cannot prefilter-encode to its (NUM_BIG_OVERFLOW, handle) key and falls back to post-decode equality checks, even though the predicate and graph are known at those call sites.
Proposal
Thread (g_id, p_id) through the prefilter call sites so bound decimal/overflow-integer constants resolve via find_numbig_handle. An arena miss means the constant matches no base row — which is itself a useful prefilter outcome (empty base scan, overlay-only check).
Low priority: post-decode equality is correct today; this is a scan-narrowing optimization for equality lookups on arena-keyed numerics.
Context
value_to_otype_okey(fluree-db-query/src/binary_scan.rs) resolves big numerics against the per-(graph, predicate) NumBig arena when given anumbig_ctx: Option<(GraphId, u32)>. The overlay-translation caller passes the context; the two bound-object prefilter callers passNone:encode_bound_object_prefilter)So a query constant like
?s ex:budget 19.99(typedxsd:decimal) cannot prefilter-encode to its(NUM_BIG_OVERFLOW, handle)key and falls back to post-decode equality checks, even though the predicate and graph are known at those call sites.Proposal
Thread
(g_id, p_id)through the prefilter call sites so bound decimal/overflow-integer constants resolve viafind_numbig_handle. An arena miss means the constant matches no base row — which is itself a useful prefilter outcome (empty base scan, overlay-only check).Low priority: post-decode equality is correct today; this is a scan-narrowing optimization for equality lookups on arena-keyed numerics.