- From: Ivan Mikhailov <imikhailov@openlinksw.com>
- Date: Tue, 26 May 2009 23:19:04 +0700
- To: Axel Polleres <axel.polleres@deri.org>
- Cc: Simon Schenk <sschenk@uni-koblenz.de>, Steve Harris <steve.harris@garlik.com>, "Seaborne, Andy" <andy.seaborne@hp.com>, "public-rdf-dawg@w3.org" <public-rdf-dawg@w3.org>
Hello Axel, > aehm... you won. :-) > It starts to look to me like that nesting in FILTERs doesn't really have > any advantages. Anybody arguments in favor of the FILTERed version? I'd prefer to not rewrite at all a BI query like select ?book ?p1 ?dp1 ?end1 where { ?offer1 :itm ?book ; :price ?p1 . OPTIONAL { ?offer1 :discountPrice ?dp1 ; :endDate ?end1 . filter ((?dp1/?p1 < 0.3) || ASK { ?offer2 :itm ?book ; :price ?p2 . OPTIONAL { ?offer2 :discountPrice ?dp2 ; :endDate ?end2 . filter (?end2 >= ?end1) } filter (?dp1/?p1 < ?dp2/?p2) } } ) } } because the semantics of FILTER in OPTIONAL is "interesting enough": it's hard to move the expression to some other place without affecting cardinality of the result set. Of course it is possible to replace left outer join with UNION but it easily doubles the length of the query for each OPTIONAL, mere 5 OPTIONALs would explode the query 32 times. Best Regards, Ivan Mikhailov OpenLink Software http://virtuoso.openlinksw.com
Received on Tuesday, 26 May 2009 16:19:53 UTC