Made a first implementation of the UNION construct#20
Made a first implementation of the UNION construct#20JackJackie wants to merge 2 commits intomainfrom
Conversation
|
@bnouwt: I made a first implementation of the UNION construct. It took somewhat more thinking and implementation as a UNION combines two graph patterns with an OR. Each of the graph patterns in itself can have all the supported constructs, so I had to introduce the subdecomposition concept to enabling nesting of multiple graph patterns. Anyways, check it out and see if it works for you. I tested it out on a simple UNION of 2 triple patterns and of a more complex UNION of which one of the patterns also contains multiple VALUES statements. At my end it worked :-) To be continued. |
|
Good job and thanks, @JackJackie! I've tested the query described in this comment, but modified it slightly to fit the SPARQL endpoint test in Unfortunately, it did not work immediately, so I did the following to get it working:
and this results in the following It seems like the graph patterns are correctly extracted from the SPARQL query and fed to the Knowledge Engine and the first query above could in principle also work if the Curious what you think! Regards, Barry |
|
Hi @JackJackie, just a thought: I am wondering whether it is possible to ignore unknown constructs instead of giving errors like the ones I describe in my previous comment and raised by this code. You would recursively traverse the algebra looking for relevant parts of the query that require translation into knowledge engine terms (graph patterns, binding sets, knowledge interactions) and ignoring anything that does not need translation. |
|
@bnouwt : I just made an attempt to also cover DISTINCT, LIMIT and FILTER of blanks. As the filters do not contain any triple pattern, it is relatively easy to ignore them when contacting the knowledge network. So, only the actual triples are taken as different graph patterns to be asked from the knowledge network. The query below is now handled without exceptions. I'm not sure if the end result of the query is correct :-). This leads to 4 main graph patterns to be asked, one per part of the UNIONs. Check it out! The logs thus show the following main graph patterns extracted from the query and fired on the knowledge network. Let me know if this is correct! |
The I was unfortunately not able to fully test the LodView tool, because issue #21, #22, #23 were still preventing correct functioning, but we are getting there! |
No description provided.