Repository navigation
Fix the benchmark-queries crash for ASK queries with --result-file - #360
Merged
Merged
Conversation
The result of an ASK query in `application/sparql-results+json` has no bindings but a single boolean. Report it with size 1 and write the boolean to the result file, instead of crashing with "'NoneType' object is not iterable" and reporting size 0.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
…son` QLever reports a `resultsize` of 0 for an ASK query, with the boolean in `res`. Use the same ASK criterion for the size and the results of `application/sparql-results+json`, and treat missing bindings as empty.
One test covers the ASK result in both JSON formats. The SELECT block is dropped, the existing tests cover that path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So far,
qlever benchmark-queriescrashed withTypeError: 'NoneType' object is not iterablefor an ASK query when the result format wasapplication/sparql-results+jsonand a result file was requested with--result-file. The reason is that the result of an ASK query has no bindings, but a single boolean. The size of an ASK result was also reported as 0, in both JSON formats.This change reports the result of an ASK query with size 1 and writes the boolean to the result file. In particular, fixes ad-freiburg/qlever#3837.