Notice: Scheduled maintenance is set for Tuesday, Sept 2nd at 1am EST. During this time, we will experience up to 20 minutes of downtime. Thank you for your patience.


The following query:

SELECT *
{
  SELECT (COUNT(?x1) as ?openTriplets)
  WHERE {
    ?x1 ?a1 ?y1 .
    ?y1 ?b1 ?z1 .
    FILTER NOT EXISTS {?z1 ?c1 ?x1}
  }
}

Gives 6 for ?openTriplets when run at sparql.org on the books database. This query:

SELECT ?openTriplets
{
  SELECT (COUNT(?x1) as ?openTriplets)
  WHERE {
    ?x1 ?a1 ?y1 .
    ?y1 ?b1 ?z1 .
    FILTER NOT EXISTS {?z1 ?c1 ?x1}
  }
}

Gives 0 results.

Take the query and remove the second triple pattern and the filter and ?openTriplets will have a non-zero answer.

Is the second query exposing a bug in Fuseki/ARQ? Or is there something I don't understand?

asked 01 Feb '13, 02:10

harschware's gravatar image

harschware ♦
7.7k1616
accept rate: 20%

edited 28 Mar '13, 12:55

Rob%20Vesse's gravatar image

Rob Vesse ♦
13.9k1715

1

The second type of projection does work on a sesame/owlim store so a bug in ARQ/fuseki as used at sparql.org is quite likely.

(01 Feb '13, 05:01) Jerven ♦ Jerven's gravatar image

Yes this does appear to be a bug in ARQ, a quick bit of digging with the query validator to inspect the different algebras shows that the second query causes ARQ to rename the variables differently (which it does to get scope correct when subqueries are involved).

I filed this as JENA-389, I suspect Andy shall have to take a look at this to figure out why this goes wrong because this is fairly deep in the ARQ engine.

link

answered 01 Feb '13, 05:01

Rob%20Vesse's gravatar image

Rob Vesse ♦
13.9k1715
accept rate: 29%

Rob - Thanks for recording this. It's in the same class as JENA-340.

(01 Feb '13, 05:29) AndyS ♦ AndyS's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×597
×46
×20
×3

Asked: 01 Feb '13, 02:10

Seen: 899 times

Last updated: 28 Mar '13, 12:55