Skip to content

Query entries given a pre-built view or dataset ignore a dataset the query names #2034

Open

Description

@bplatz

An engine entry that is handed a resolved view (GraphDb) or dataset (DataSetDb) and then reads a query that names its own dataset either honors that dataset or ignores it without a word. When it ignores it, the query answers from a different graph than it names, with no error. Three instances so far:

  • Server default-graph-uri: parsed and then discarded, fixed in 993b095.
  • Streaming over a pre-built dataset: plan_stream_query_dataset_with_options treats the dataset as resolved, so a SPARQL FROM / FROM NAMED in the text is parsed and ignored. The Python package's ledger stream() reached this; feat(python): the fluree Python package #2025 now resolves the clause with Fluree::sparql_dataset_within_ledger before planning.
  • JSON-LD on a view: query / explain / the stream planner on a GraphDb ignore from, fromNamed, from-named and ledger, at the top level or in opts. The server's ledger-scoped route avoids it by routing a body with from onto the dataset path (pin_jsonld_dataset). feat(python): the fluree Python package #2025 refuses these keys in the Python package unless they name the handle's own ledger.

Proposed: every entry that takes a GraphDb or a pre-built DataSetDb either applies a dataset named in the query or refuses it with a 400. Within-ledger graphs, like query()'s D-3 path, can be applied; anything else is refused. Once that is in place, the guard in the Python package (jsonld_reads_ledger) and its stream-side resolution become redundant and can go.

Activity

  1. added
    bug
    P2
    area:query
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2area:querybug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions