79791772

Date: 2025-10-16 04:32:32
Score: 1
Natty:
Report link

I don't know if executing a query on an empty graph should cause an exception!

But to answer the question no: RDFLib doesn't do more than what you've indicated there with translateQuery.

At least some other SPARQL validate quries also don't do more, such as the JS toolkit we use for query validation at https://tools.kurrawong.ai/query, so it would be a good RDFLib extension to add in a query validate function that could pick up things like this case of a nonexistent GROUP BY clause, but we've have to be careful to not over-exten what the SHACL spec says you can validate for, i.e. does nonexistent GROUP BY clause cause a validation error or it it just a bad query (user error)?

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
Posted by: Nicholas Car