Menu

#72 extra pair of curly brackets changes semantics

open-works-for-me
5
2011-09-27
2011-09-27
No

We discovered a strange behavior for simple queries.

Two queries that are semantically equivalent but syntactically different (one has an extra pair of curly brackets) result in two different result sets.

SELECT * {
{ ?s0 a :pathway .
?s0 :id ?o1 .
?s0 :hasGene ?o2 . }
FILTER (?o1 = "xyz")
} LIMIT 20

vs.

SELECT * {
{ ?s0 a :pathway .
?s0 :id ?o1 .
{ ?s0 :hasGene ?o2 .} }
FILTER (?o1 = "xyz")
} LIMIT 20

Note: in the 2nd query, the last triple pattern is enclosed in an additional pair of parenthesis.
The 2nd query does not yield results, the first one does.

IMHO the queries are semantically completely identical and thus I expect their must be a bug in the query processing?!

Discussion

  • Ivan Mikhailov

    Ivan Mikhailov - 2011-09-27

    What are source data to reproduce? I'm testing thesetwo on 6.1.4 prerelease and the SQL code generated for these two queries differ only in names of generated aliases, but 100% logically equivalent.

     
  • Ivan Mikhailov

    Ivan Mikhailov - 2011-09-27
    • status: open --> open-works-for-me
     

Log in to post a comment.