In trying to answer a StackOverflow question [1], I ended up writing
this query for the DBpedia endpoint [2], which works:

[[[
select ?s ?p ?o where {
  values ?web { dbpedia:World_Wide_Web }
  values ?p   { rdf:type dbpedia-owl:abstract }

  ?web ?p ?o bind( ?web as ?s )
}
limit 3
]]]

Note that there are _two_ values for `?p`.  When I try to add a union
to the pattern, I get an error:

[[[
Virtuoso 37000 Error SP031: SPARQL compiler: Internal error:
sparp_gp_attach_filter_cbk(): attempt to attach a filter with used
variable

SPARQL query:
define sql:big-data-const 0
#output-format:text/html
define sql:signal-void-variables 1 define input:default-graph-uri
<http://dbpedia.org> select ?s ?p ?o where {
  values ?web { dbpedia:World_Wide_Web }
  values ?p   { rdf:type dbpedia-owl:abstract }

  { ?web ?p ?o bind( ?web as ?s ) }
  union
  { ?s ?p ?web bind( ?web as ?o ) }
}
limit 3
]]]

Is this a Virtuoso bug, or a bug in the DBpedia endpoint
configuration, or something else?  The query (when prefixes are added)
is legal SPARQL that's accepted by the validator at sparql.org.

[1] http://stackoverflow.com/q/21002440/1281433
[2] http://dbpedia.org/sparql
-- 
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to