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

Various bugfixes. Ensured node ids in the triple graph use 64 bits. #182

Merged
merged 2 commits into from Jan 29, 2019

Conversation

floriankramer
Copy link
Member

The main problem fixed was the vectors storing the SubtreePlans of a
graphs children in the QueryPlanner being resized and thus reallocating
while pointers to the previous location of these plans were still in
use. This fixes the following query:

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>

SELECT ?QLC_COMPLETE ?QLC_COUNT ?QLC_ALIAS_COMPLETE WHERE {
 {
  SELECT ?QLC_COMPLETE (COUNT(?QLC_COMPLETE) AS ?QLC_COUNT) WHERE {
   ?occupation_id ql:has-predicate ?QLC_COMPLETE .
   ?x wdt:P106 ?occupation_id .
   ?x wdt:P31 wd:Q5 .
   ?x p:P2048 ?statement .
   ?x wdt:P21 ?gender_id .
   ?gender_id @en@<http://www.w3.org/2000/01/rdf-schema#label> ?gender .
   ?statement psv:P2048 ?value .
   ?value wikibase:quantityNormalized ?quantity .
   ?quantity wikibase:quantityUnit wd:Q11573 .
   ?quantity wikibase:quantityAmount ?height .
  }
  GROUP BY ?QLC_COMPLETE
 }
 {
  {
   ?QLC_CLAIM wikibase:directClaim ?QLC_COMPLETE .
  } UNION {
   ?QLC_CLAIM wikibase:claim ?QLC_COMPLETE .
  }
 } UNION {
  ?QLC_CLAIM wikibase:statementValue ?QLC_COMPLETE .
 }

 { ?QLC_CLAIM @en@rdfs:label ?QLC_ALIAS_COMPLETE . } UNION { ?QLC_CLAIM @en@skos:altLabel ?QLC_ALIAS_COMPLETE .}
}
ORDER BY DESC(?QLC_COUNT) 

The main problem fixed was the vectors storing the SubtreePlans of a
graphs children in the QueryPlanner being resized and thus reallocating
while pointers to the previous location of these plans were still in
use.
Copy link
Member

@niklas88 niklas88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, must have been quite an investigation to find that overflow! I'm impressed.

With the newest rewrite of `MultiColumnJoin::getVariableColumns()` the removed comment became outdated. I think the code is simple enough to go without a comment. This is especially true as the removed comment was hard to read anyway.
@niklas88 niklas88 merged commit 5d5e163 into ad-freiburg:master Jan 29, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants