-
Notifications
You must be signed in to change notification settings - Fork 6
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
Errors in SPARQL query results #8
Comments
Hi! Thank you for trying oxrdflib.
It's amazing \o/. Oxigraph has no real query optimizer yet so I am hoping even better performances in the future.
It seems I missed a behavior of the
Thank you! I have not had time yet to investigate it yet. I believe it's likely to be something related to the way |
After investigation I have found the cause of the error: |
Thank you kindly @Tpt ! Yes, our queries have lots of UNIONs and binding variables that work with OWL restrictions. For now, as a workaround, we have a function to expand binding variables into a query explicitly: https://github.com/DerwenAI/kglab/blob/274064e2c096d5778ab980ce3f2730e262ba1c6c/kglab/kglab.py#L1185 Using with that (on an enterprise use case) we were able get through our suite of regression tests with quite a variety of SPARQL queries, so it appears to be working well. A typical editing session / user workflow in that app requires 60-90 SPARQL queries, some of which had required several minutes each to run. Now the time for an entire workflow has dropped to seconds instead! Please let us know if we can help with test or evaluation in any way. We'll be watching the new releases closely :) |
It is amazing!
I am considering adding a similar workaround to oxrdflib, but I would have to support also
Thank you! It would be amazing! If you have automated tests related to rdflib I would love to integrate them in this repostiory test suite (I use python |
sure. let's collect the requirements and examples DerwenAI/kglab#248 |
I have released v0.3.1 with a fix for namespace support. I have also open #11 about the Feel free to close this issue if you think everything is now fixed or covered by other issues or to keep it open if you encounter other problems. |
Looks good, many thanks @Tpt ! |
Hi @Tpt ,
First, thank you very much for the excellent
oxrdflib
library. We've had multiple requests to integrate this with ourkglab
project, and in some cases (e.g., with unions and axes) we see queries that have ~2 orders of magnitude better performance than with the defaultRDFlib.Store
implementation.One of our use cases at BASF has identified a couple issues, and we wanted to provide a minimal code example to replicate these errors. The following script:
... was run with Python 3.8.10 on macOS with
oxrdflib
0.3.0 installed from the repo (not PyPi) and produces these results:Based on the TTL input and SPARQL queries used, each query should have one result row. The issues appear to be:
oxrdflib
will throw aSyntaxError
exceptionOPTIONAL
clause does not appear to work correctly; see the case that printsMISSING RESULT
where the?comment
variable was within anOPTIONAL
clauseinitBindings
parameter does not appear to work correctly; see the sameMISSING RESULT
case which works correctly versus when we do an explicit string replace in the query string (which produces correct results)Please let us know if we can help troubleshoot any further?
cc: @paoespinozarias @neobernad @jelisf @Mec-iS @davidshumway
The text was updated successfully, but these errors were encountered: