Skip to content

SPARQL*: How should bind act? #1026

Description

@JervenBolleman

Specifically in relation to non present triples and construct queries.

On an empty store

PREFIX ex:<http://example.org/>
SELECT ?x {
  BIND(<<ex:1 ex2: ex:3>> AS ?x)
}

expect one result.

PREFIX ex:<http://example.org/>
SELECT ?x {
  BIND(<<ex:1 ex:2 ?lala>> AS ?x)
}

expect no results.

Store with a single named graph
containing

ex:1 ex2: ex:3
PREFIX ex:<http://example.org/>
SELECT ?x {
  <<?s ?p ?o>>
  BIND(<<ex:1 ex2: ex:3>> AS ?x)
  FILTER(sameTerm(<<?s ?p ?o>> , ?x))
}

One result.

Store with two named graphs

graph:1 {ex:1 ex2: ex:3}
graph:2 {ex:1 ex2: ex:3}

Union graph semantics

PREFIX ex:<http://example.org/>
SELECT ?x {
  <<?s ?p ?o>>
  BIND(<<ex:1 ex2: ex:3>> AS ?x)
  FILTER(sameTerm(<<?s ?p ?o>> , ?x))
}

expect two results

PREFIX ex:<http://example.org/>
SELECT DISTINCT ?x {
  <<?s ?p ?o>>
  BIND(<<ex:1 ex2: ex:3>> AS ?x)
  FILTER(sameTerm(<<?s ?p ?o>> , ?x))
}

expect one result

Basically the issue comes down to a bind of a non variable currently (sparql 1.1) gives one value. In SPARQL* it might give more than one value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions