Alan Hinchliff created RYA-403: ---------------------------------- Summary: Rya property path query not returning full results Key: RYA-403 URL: https://issues.apache.org/jira/browse/RYA-403 Project: Rya Issue Type: Bug Affects Versions: 3.2.11 Environment: Hadoop 2.7.4; Accumulo 1.8.1; Rya 3.2.11 Reporter: Alan Hinchliff Attachments: 20170201.as-rel2.txt.100node.xml, rya-testing.log
We are trying to evaluate using Rya for an application, primarily involving property path queries. It seems that the results returned by Rya are incomplete; while results from a competing database returns complete results. This query uses a property path feature of SPARQL 1.1 (and a subquery feature) to identify a path between two nodes in the dataset (Node-395796 and Node-101) by defining a regular expression between source node and some node X and X and the destination node. The subquery searches for all paths between X and destination and the first part looks for all paths between source and X. {code:sql} prefix nml: <http://schemas.ogf.org/nml/base/2013/02#> prefix bgp: <http://schemas.ogf.org/nml/bgp/2017/03#> prefix : <http://code.renci.org/projects/serpent#> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT DISTINCT ?inPort ?x ?outPort WHERE { :Node-395796 ( nml:hasOutboundPort / ( bgp:isCPSource | bgp:isPPSource ) / ( bgp:hasCPSink | bgp:hasPPSink ) / bgp:isInboundPort )* / nml:hasOutboundPort / ( bgp:isCPSource | bgp:isPPSource ) / ( bgp:hasCPSink | bgp:hasPPSink ) ?inPort . ?inPort bgp:isInboundPort ?x . ?x rdf:type nml:Node . { SELECT DISTINCT ?x ?outPort WHERE { ?x nml:hasOutboundPort ?outPort . ?outPort ( bgp:isCPSource | bgp:isPPSource ) / ( bgp:hasCPSink | bgp:hasPPSink ) / bgp:isInboundPort / ( nml:hasOutboundPort / ( bgp:isCPSource | bgp:isPPSource ) / ( bgp:hasCPSink | bgp:hasPPSink ) / bgp:isInboundPort )* :Node-101 . } } } {code} Results from Rya: {code:xml} <sparql xmlns="http://www.w3.org/2005/sparql-results#"> <head> <variable name="inPort"/> <variable name="x"/> <variable name="outPort"/> </head> <results> <result> <binding name="x"> <uri>http://code.renci.org/projects/serpent#Node-395378</uri> </binding> <binding name="outPort"> <uri> http://code.renci.org/projects/serpent#Port-Node-395378-Node-25899 </uri> </binding> <binding name="inPort"> <uri> http://code.renci.org/projects/serpent#Port-Node-395378-Node-395796 </uri> </binding> </result> </results> </sparql> {code} Results from different database, formatted as {noformat} inPort --- x --- outPort {noformat} {code:none} http://code.renci.org/projects/serpent#Port-Node-395378-Node-395796 --- http://code.renci.org/projects/serpent#Node-395378 --- http://code.renci.org/projects/serpent#Port-Node-395378-Node-25899 http://code.renci.org/projects/serpent#Port-Node-25899-Node-395378 --- http://code.renci.org/projects/serpent#Node-25899 --- http://code.renci.org/projects/serpent#Port-Node-25899-Node-101 {code} A sample dataset ({{20170201.as-rel2.txt.100node.xml}}) and logs ({{rya-testing.log}}) from running the query are attached. Are we using SPARQL queries unsupported by Rya? -- This message was sent by Atlassian JIRA (v6.4.14#64029)