gjhiggins/rdflib — Issue #89: assert in SPARQL query when two OPTIONAL are followed by non-OPTIONAL
Author: gjhiggins
Created: 2011-10-19 01:17:44+00:00
State: open

Originally filed by udi.benr...@gmail.com on 2009-11-05T02:13:48

from rdflib.Graph import *
# This code generate an assert
Graph().query("""select * {
optional { ?a ?b ?c }
optional { ?d ?e ?f }
?x ?y ?z
}""")

# This is OK
Graph().query("""select * {
?x ?y ?z
optional { ?a ?b ?c }
optional { ?d ?e ?f }
}""")

# This is OK
Graph().query("""select * {
optional { ?a ?b ?c }
?x ?y ?z
optional { ?d ?e ?f }
}""")