SPARQL: PropertyListPathNotEmpty children should be ObjectListPath for consistency

pull/171/head
Tpt 3 years ago
parent 5b54f45194
commit 5aeea55884
  1. 8
      spargebra/src/parser.rs
  2. 5
      testsuite/oxigraph-tests/sparql/manifest.ttl
  3. 5
      testsuite/oxigraph-tests/sparql/property_list_path.rq

@ -1665,15 +1665,15 @@ parser! {
patterns: ho.patterns
}, |mut a, b| {
a.focus.push(b.focus);
a.patterns.extend(b.patterns.into_iter().map(|v| v.into()));
a.patterns.extend(b.patterns);
a
})
}
rule PropertyListPathNotEmpty_item() -> Option<FocusedTriplePattern<(VariableOrPropertyPath,Vec<AnnotatedTermPath>)>> = ";" _ c:PropertyListPathNotEmpty_item_content()? {
rule PropertyListPathNotEmpty_item() -> Option<FocusedTripleOrPathPattern<(VariableOrPropertyPath,Vec<AnnotatedTermPath>)>> = ";" _ c:PropertyListPathNotEmpty_item_content()? {
c
}
rule PropertyListPathNotEmpty_item_content() -> FocusedTriplePattern<(VariableOrPropertyPath,Vec<AnnotatedTermPath>)> = p:(VerbPath() / VerbSimple()) _ o:ObjectList() _ {
FocusedTriplePattern {
rule PropertyListPathNotEmpty_item_content() -> FocusedTripleOrPathPattern<(VariableOrPropertyPath,Vec<AnnotatedTermPath>)> = p:(VerbPath() / VerbSimple()) _ o:ObjectListPath() _ {
FocusedTripleOrPathPattern {
focus: (p, o.focus.into_iter().map(AnnotatedTermPath::from).collect()),
patterns: o.patterns
}

@ -12,6 +12,7 @@
:describe_where
:group_concat_with_null
:single_not_exists
:property_list_path
) .
:describe rdf:type mf:QueryEvaluationTest ;
@ -42,3 +43,7 @@
[ qt:query <single_not_exists.rq> ;
qt:data <describe_input.ttl> ] ;
mf:result <single_not_exists.srx> .
:property_list_path rdf:type mf:PositiveSyntaxTest ;
mf:name "PropertyListPathNotEmpty children should be ObjectListPath for consistency" ;
mf:action <property_list_path.rq> .

@ -0,0 +1,5 @@
PREFIX ex: <http://example.com/>
SELECT ?o WHERE {
?s a ex:A ; ex:p [ ex:p1/ex:p2 ?o ]
}
Loading…
Cancel
Save