SPARQL: Fix ASK + FROM combination

Previously ASK FROM only worked without WHERE
pull/647/head
Vilnis Termanis 1 year ago committed by Thomas Tanon
parent b777d0110a
commit c1b57f460b
  1. 2
      lib/spargebra/src/parser.rs
  2. 1
      testsuite/oxigraph-tests/sparql/ask_from.rq
  3. 5
      testsuite/oxigraph-tests/sparql/manifest.ttl

@ -1055,7 +1055,7 @@ parser! {
} }
rule DescribeQuery_item() -> NamedNodePattern = i:VarOrIri() _ { i } rule DescribeQuery_item() -> NamedNodePattern = i:VarOrIri() _ { i }
rule AskQuery() -> Query = i("ASK") _ d:DatasetClauses() w:WhereClause() _ g:GroupClause()? _ h:HavingClause()? _ o:OrderClause()? _ l:LimitOffsetClauses()? _ v:ValuesClause() {? rule AskQuery() -> Query = i("ASK") _ d:DatasetClauses() _ w:WhereClause() _ g:GroupClause()? _ h:HavingClause()? _ o:OrderClause()? _ l:LimitOffsetClauses()? _ v:ValuesClause() {?
Ok(Query::Ask { Ok(Query::Ask {
dataset: d, dataset: d,
pattern: build_select(Selection::no_op(), w, g, h, o, l, v, state)?, pattern: build_select(Selection::no_op(), w, g, h, o, l, v, state)?,

@ -0,0 +1 @@
ASK FROM <scheme://a.graph> WHERE { }

@ -16,6 +16,7 @@
:long_unicode_escape_with_multibytes_char_update :long_unicode_escape_with_multibytes_char_update
:describe :describe
:describe_where :describe_where
:ask_with_from
:group_concat_with_null :group_concat_with_null
:single_not_exists :single_not_exists
:property_list_path :property_list_path
@ -63,6 +64,10 @@
qt:data <describe_input.ttl> ] ; qt:data <describe_input.ttl> ] ;
mf:result <describe_output.ttl> . mf:result <describe_output.ttl> .
:ask_with_from rdf:type mf:PositiveSyntaxTest ;
mf:name "ASK with FROM" ;
mf:action <ask_from.rq> .
:group_concat_with_null rdf:type mf:QueryEvaluationTest ; :group_concat_with_null rdf:type mf:QueryEvaluationTest ;
mf:name "GROUP_CONCAT with NULL" ; mf:name "GROUP_CONCAT with NULL" ;
rdfs:comment "GROUP_CONCAT should ignore null values" ; rdfs:comment "GROUP_CONCAT should ignore null values" ;

Loading…
Cancel
Save