Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPARQL results table visualization omits optional results #14

Closed
pmaria opened this issue Mar 10, 2024 · 3 comments
Closed

SPARQL results table visualization omits optional results #14

pmaria opened this issue Mar 10, 2024 · 3 comments

Comments

@pmaria
Copy link

pmaria commented Mar 10, 2024

Given

@prefix ex: <http://example.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

ex:alice
  ex:name "Alice" ;
  ex:age "25"^^xsd:integer .

ex:bob 
  ex:name "Bob" ;
  ex:age "25"^^xsd:integer .

ex:charlie
  ex:name "Charlie" ;
  ex:age "25"^^xsd:integer .

ex:dave
  ex:name "Dave" ;
  ex:age "25"^^xsd:integer .

running the following query

PREFIX ex: <http://example.org/>

select ?name ?age
where {
  ?person ex:name ?name .
  OPTIONAL{?person ex:age ?age.}
}

gives the following expected result

image

But executing the same query on this input:

@prefix ex: <http://example.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

ex:alice
  ex:name "Alice" .
  # ex:age "25"^^xsd:integer .

ex:bob 
  ex:name "Bob" ;
  ex:age "25"^^xsd:integer .

ex:charlie
  ex:name "Charlie" ;
  ex:age "25"^^xsd:integer .

ex:dave
  ex:name "Dave" ;
  ex:age "25"^^xsd:integer .

give this result:

image

with this data result:

"Alice"
"Bob";"25"
"Charlie";"25"
"Dave";"25"
@RinkeHoekstra
Copy link
Collaborator

That's interesting. Investigating...

@RinkeHoekstra
Copy link
Collaborator

I did something silly when creating the array of variables that's used to populate the columns. This is now fixed and will be in the next release.

@pmaria
Copy link
Author

pmaria commented Mar 29, 2024

Great! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants