ad-freiburg / qlever

Very fast SPARQL Engine, which can handle very large knowledge graphs like the complete Wikidata, offers context-sensitive autocompletion for SPARQL queries, and allows combination with text search. It's faster than engines like Blazegraph or Virtuoso, especially for queries involving large result sets.
Apache License 2.0
417 stars 52 forks source link

Prevent segfault for `COUNT(*)` with the `GROUP BY` hash map optimization #1471

Closed RobinTF closed 2 months ago

RobinTF commented 2 months ago

This is a bug I encountered when messing around queries like this

PREFIX p: <http://www.wikidata.org/prop/>
SELECT (COUNT(*) as ?c) WHERE {
  ?x p:P2860  ?z
}
GROUP BY ?x

would result in a segfault when hash map optimizations for group by are enabled because the code assumed exactly one child of any expression which isn't the case for COUNT(*)

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.45%. Comparing base (be816a9) to head (9019388). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1471 +/- ## ========================================== + Coverage 89.41% 89.45% +0.03% ========================================== Files 346 346 Lines 25350 25353 +3 Branches 3381 3380 -1 ========================================== + Hits 22667 22679 +12 + Misses 1494 1491 -3 + Partials 1189 1183 -6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud