-
Notifications
You must be signed in to change notification settings - Fork 45
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
Consistent handling of implicit and explicit LIMIT
clauses
#1355
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1355 +/- ##
==========================================
+ Coverage 88.77% 88.87% +0.10%
==========================================
Files 324 326 +2
Lines 28676 28926 +250
Branches 3172 3205 +33
==========================================
+ Hits 25456 25709 +253
+ Misses 2067 2065 -2
+ Partials 1153 1152 -1 ☔ View full report in Codecov by Sentry. |
mediaType == MediaType::qleverJson)) { | ||
maxSend = MAX_NOF_ROWS_IN_RESULT; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously the exporter only applied maxSend to json results, tsv/csv results were not affected. For now I decided to keep this behaviour, because we can easily stream csv/tsv results without having to aggregate a giant string in memory, whereas we can't do that in JSON due to limitations of the JSON framework we use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a very minor suggestion for renaming things.
Quality Gate passedIssues Measures |
LIMIT
clauses.
LIMIT
clauses.LIMIT
clauses
#1355 changed the effect of the QLever-specific `send` parameter by clamping the `LIMIT` of the query accordingly, and adding one if none was there. This has the effect that, in the QLever UI, the result size of all queries with a result with more tha 100 rows was since shown as `100`. This PR tries to revert this unwanted effect while keeping the good stuff from #1355 (which unified the code for the various export formats and fixed various inconsistencies). The behavior is now as follows: 1. The query is first processed according to the `LIMIT` specified in the query. In particular, if no `LIMIT` is specified, the full result is materialized internally. 2. At most `send` bindings are exported. In the QLever JSON, there are now two fields: `resultsize` (the size of the internally computed result) and `sent` (the number of bindings exported). The idea is to add an option in the QLever UI for automatically adding a `LIMIT' to each query. That option should be activated by default (in order to save computation time), but a user should be able to deactivate it in case they are interested in the full result size. Future work: When one is only interested in the size of the full result, that can als be computed without fully materializing it. That would save RAM compared to the current approach.
There were some inconsistencies between explicit LIMIT clauses and the HTTP parameter
send
(which is used by the QLever UI) which are fixed by this PR.Notable Changes after this PR is merged: