Skip to content

Variable-free FILTER eliminates every solution (FILTER(true) returns zero rows) #1439

Description

@aaj3f

FILTER(true), FILTER(1=1), FILTER(2 IN (1,2,3)) return zero rows through the public query API; the same filter with any variable reference works. Root cause: required_vars = referenced_vars() is empty, so the filter is "eligible" before any triple binds and is inlined against the seed row (fluree-db-query/src/execute/where_plan.rs:697,:990).

Silent wrong results on both the SPARQL and JSON-LD surfaces (shared IR). Planner-only fix: evaluate constant filters once per stream. Roadmap PR-X1 (D1).

Found and verified by the W3C SPARQL burn-down audit (PR #1437; docs/audit/burn-down/ROADMAP.md §5 on branch test/sparql-testsuite-full-coverage).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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