Skip to content

Bound-object prefilters skip NumBig arena resolution for decimal/bigint constants #1328

Description

@bplatz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions