openlink / virtuoso-opensource

Virtuoso is a high-performance and scalable Multi-Model RDBMS, Data Integration Middleware, Linked Data Deployment, and HTTP Application Server Platform
https://vos.openlinksw.com
Other
864 stars 210 forks source link

simplistic property paths result in errors despite direct edges... #641

Open joernhees opened 7 years ago

joernhees commented 7 years ago

A query like

ASK { dbr:Braveheart (<>|!<>)+ dbr:Mel_Gibson }

results in:

Virtuoso 42000 Error TN...: Exceeded 1000000000 bytes in transitive temp memory.  use t_distinct, t_max or more T_MAX_memory options to limit the search or increase the pool

try yourself

Thing is: there are several direct edges, so i guess this is a bug in the query planner...

SELECT * { dbr:Braveheart ?p dbr:Mel_Gibson }

see also: http://stackoverflow.com/questions/43269978/use-sparql-property-path-on-dbpedia

kidehen commented 7 years ago

@joernhees

A few issues:

[1] <> is an invalid predicate identifier

[2] The public DBpedia endpoint isn't configured to accept that kind of query hence the error

Alternative instances that produce solutions, using <#this> rather than <> :

[1] http://dbpedia-live.openlinksw.com/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=prefix+dbpedia%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F%3E+%0D%0AASK+%7B+dbpedia%3ABraveheart+%28%3C%23this%3E%7C%21%3C%23this%3E%29%2B+dbpedia%3AMel_Gibson+%7D&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000&debug=on -- DBpedia-Live instance we host

[2] http://lod.openlinksw.com/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=prefix+dbpedia%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F%3E+%0D%0AASK+%7B+dbpedia%3ABraveheart+%28%3C%23this%3E%7C%21%3C%23this%3E%29%2B+dbpedia%3AMel_Gibson+%7D&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000&debug=on -- LOD Cloud Cache instance

joernhees commented 7 years ago

thanks for the reply, good to see this actually works on other endpoints

i could bet i've seen <> tons of times for property paths... if it's not valid, shouldn't the parser complain?

kidehen commented 7 years ago

@joernhees ,

For Virtuoso, <> identifies a document (Location of Content that returns 200 OK on HTTP GET) which is why <#> or <#this> work. This isn't a parsing issue since it has more to do with the semantics of an identifier.