The following query https://w.wiki/7Tep counts prevalence of location properties for Rivers:
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
select
(count(*) as ?rivers)
(sum(?country ) as ?country )
(sum(?continent ) as ?continent )
(sum(?adminEntity ) as ?adminEntity )
(sum(?location ) as ?location )
(sum(?physFeature ) as ?physFeature )
(sum(?significantPlace ) as ?significantPlace )
(sum(?statisticalEntity) as ?statisticalEntity)
{
{select distinct ?river {?river wdt:P31/wdt:P279* wd:Q4022}} # instance of any subclass of: river
bind(if(exists{?river wdt:P17 []},1,0) as ?country )
bind(if(exists{?river wdt:P30 []},1,0) as ?continent )
bind(if(exists{?river wdt:P131 []},1,0) as ?adminEntity )
bind(if(exists{?river wdt:P276 []},1,0) as ?location )
bind(if(exists{?river wdt:P706 []},1,0) as ?physFeature )
bind(if(exists{?river wdt:P7153 []},1,0) as ?significantPlace )
bind(if(exists{?river wdt:P8138 []},1,0) as ?statisticalEntity)
}It causes Stack Overflow in Blazegraph. The stack trace is too long to cite (duh) but it seems the culprit is:
com.bigdata.rdf.sparql.ast.StaticAnalysis.collectVarsFromExpressions(StaticAnalysis.java:2101)
The same query runs ok on Ontotext GraphDB at http://162.55.95.184:7400/sparql (this is an up to date copy, but only of wdtruthy):
