Skip to content

Conversation

@RobinTF
Copy link
Collaborator

@RobinTF RobinTF commented Nov 3, 2025

Fixes #2465, this PR is similar in nature to #2404 when it comes to the symptoms, but is a completely different root cause.
Basically several GROUP BY optimisations did completely ignore previous LIMIT or OFFSET clauses. This is now either fixed by correctly handling these clauses or by disabling the optimisations for these cases.

Affected queries include:

SELECT ?x (COUNT(?x) AS ?count) WHERE {
  {
    SELECT * {
      ?x ?y ?z
    }
    OFFSET 1
    LIMIT 12
  }
}
GROUP BY ?x
SELECT ?y (COUNT(?y) AS ?count) WHERE {
  {
    SELECT * {
      ?x a ?y
    }
    OFFSET 1
    LIMIT 100
  }
}
GROUP BY ?y

@sparql-conformance
Copy link

Overview

Number of Tests Passed ✅ Failed ❌ Intended ⚠️ Not tested
525 439 19 67 0

Conformance check passed ✅

No test result changes.

Details: https://qlever.dev/sparql-conformance-ui?cur=5340eeeb7274dce96dc1f543428451799c640f45&prev=a8c9d865aac01c673ffa3b56758a12dbb94f7676

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.11%. Comparing base (a8c9d86) to head (5340eee).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2484      +/-   ##
==========================================
+ Coverage   91.09%   91.11%   +0.01%     
==========================================
  Files         465      465              
  Lines       39690    39719      +29     
  Branches     5312     5317       +5     
==========================================
+ Hits        36155    36189      +34     
+ Misses       2020     2019       -1     
+ Partials     1515     1511       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 3, 2025

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.

COUNT over pattern involving limit-bound subquery: can't wait to see the results

1 participant