- From: Eric Prud'hommeaux <eric@w3.org>
- Date: Mon, 13 Aug 2007 18:50:14 -0400
- To: Lee Feigenbaum <lee@thefigtrees.net>
- Cc: ogbujic@ccf.org, W3C Data Access Working Group <public-rdf-dawg@w3.org>
- Message-ID: <20070813225014.GB5513@w3.org>
* Lee Feigenbaum <lee@thefigtrees.net> [2007-08-13 15:31-0400] > > Chimezie Ogbuji wrote: >> Per my ACTION, I've added 6 new tests to cover *some* common, missing >> algebraic forms. 4 were added to data-r2/optional and 2 were added to >> data-r2/algebra. Unfortunately (or fortunately, if you consider >> uncovering untested bugs a good thing), RDFLib does *not* pass any of >> these tests. I've gone over them several times to verify the expected >> results. At the very least the data, queries, and results are >> well-formed (no parsing compliants). > > Thanks, Chimezie. > > I added a trailing period to algebra/join-combo-graph-2.ttl and to > optional/complex-data-1.ttl and to optional/result-complex*.ttl to get the > parser I'm using to be happy. I also removed a stray " from a namespace > declaration in result-opt-complex-2.ttl . > >> The new tests are: >> http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#join-combo-1 >> Algebra form: Join(LeftJoin(BGP(..),{..}),Join(BGP(..),Union(..,..))) >> Comment: Tests nested combination of Join with a BGP / OPT and a BGP / >> UNION >> PREFIX : <http://example/> >> SELECT ?a ?y ?d ?z >> { ?a :p ?c OPTIONAL { ?a :r ?d }. ?a ?p 1 { ?p a ?y } UNION { ?a >> ?z ?p } } > > The result set here has two bindings for ?y. I'm guessing that one (the one > bound to a literal) should be ?d but even then I don't think I'd agree with > the test. Does the test assume RDF entailment (specifically knowing that if > :a :b :c then :b a rdf:Property)? algae fails this test with the following graph differences: - <http://example/x1>|NULL|NULL|"4"^^<http://www.w3.org/2001/XMLSchema#integer> | + <http://example/x1>|NULL|"4"^^<http://www.w3.org/2001/XMLSchema#integer>|<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property>"| meaning algae misses a solution (-) and finds one (+) for which there is no corresponding solution in the reference graph. >> http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#join-combo-2 >> Algebra form: Join(Graph(varOrIRI,{..}),Union(..,..)) >> Comment: Tests combination of Join operator with Graph on LHS and Union >> on RHS >> PREFIX : <http://example/> >> SELECT ?x ?y ?z >> { GRAPH ?g { ?x ?p 1 } { ?x :p ?y } UNION { ?p a ?z } >> } > > Glitter passes this test (I haven't eyeballed it in detail). algae passes this test >> http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-1 >> Comment: Complex optional: >> LeftJoin(LeftJoin(BGP(..),{..}),Join(BGP(..),Union(..,..))) >> PREFIX foaf: <http://xmlns.com/foaf/0.1/> >> SELECT ?person ?nick ?page ?img ?name ?firstN >> { ?person foaf:nick ?nick >> OPTIONAL { ?person foaf:isPrimaryTopicOf ?page } OPTIONAL { >> ?person foaf:name ?name { ?person foaf:depiction ?img } UNION >> { ?person foaf:firstName ?firstN } } FILTER ( bound(?page) || >> bound(?img) || bound(?firstN) ) } > > I don't pass this and will try to look at it later. algae fails: - "BigB"|<tag:bert@example:foafUri>|"Bert"|NULL|NULL|NULL" >> http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-2 >> Comment: Complex optional: >> LeftJoin(Join(BGP(..),Graph(var,{..})),Union(..,..)) >> PREFIX foaf: <http://xmlns.com/foaf/0.1/> >> PREFIX ex: <http://example.org/things#> >> SELECT ?id ?ssn >> WHERE { ?person a foaf:Person; >> foaf:name ?name . GRAPH ?x { [] foaf:name ?name; >> foaf:nick ?nick >> } OPTIONAL { { ?person ex:empId ?id } UNION { ?person >> ex:ssn ?ssn } } } > > Glitter passes this. algae passes >> http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-3 >> Comment: Complex optional: >> LeftJoin(Join(BGP(..),Graph(var,{..})),LeftJoin(BGP(..),{..})) >> PREFIX foaf: <http://xmlns.com/foaf/0.1/> >> PREFIX ex: <http://example.org/things#> >> SELECT ?name ?nick ?plan ?dept >> WHERE { ?person a foaf:Person; >> foaf:name ?name . GRAPH ?x { [] foaf:name ?name; >> foaf:nick ?nick >> } OPTIONAL { ?person ex:healthplan ?plan OPTIONAL >> { ?person ex:department ?dept } } } > > Glitter passes this. algae passes >> http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-4 >> Comment: Complex optional: >> LeftJoin(Join(BGP(..),Union(..,..)),Join(BGP(..),Graph(varOrIRI,{..}))) >> PREFIX foaf: <http://xmlns.com/foaf/0.1/> >> PREFIX ex: <http://example.org/things#> >> SELECT ?name ?plan ?dept ?img WHERE { ?person foaf:name ?name { >> ?person ex:healthplan ?plan } UNION { ?person >> ex:department ?dept } OPTIONAL { ?person a foaf:Person >> GRAPH ?g { [] foaf:name ?name; >> foaf:depiction ?img } } } > > I don't pass this either. algae fails: - "Bert"|"DeptA"|<http://example.org/things#HealthPlanA>|NULL + "Bert"|NULL|<http://example.org/things#HealthPlanA>|NULL + "Bert"|"DeptA"|NULL|NULL > I'll do my best to look at these tests in more detail to see what's up a > bit later. > > Can anyone else report on these tests? > > Lee > -- -eric office: +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA mobile: +1.617.599.3509 (eric@w3.org) Feel free to forward this message to any list for any purpose other than email address distribution.
Received on Monday, 13 August 2007 22:50:17 UTC