Select distinct returns duplicate solutions

Hi I am using a query with the following structure

SELECT DISTINCT ?var1 ?var2  ?var3  WHERE {
      VALUES ?input { <http://example.com/x1> }
    {
        ?input ex:p1 ?b1
        BIND(?input as ?var1) .
    } UNION {
        ?var1 ex:p2 ?input .
        BIND(?input as ?b1) .
    }
  
      ?var1 ex:p2 ?v2 .
  
      ?b1 wgs84:lat ?lat ;
                wgs84:long ?long .
  
    # some more nested patterns for binding ?var2 ?var3
}

with my data, the query should return 2 different solutions while it returns 4 (with 2 duplicates) which I think should be a bug

Hi Dimitris,

Any chance we can get the data to reproduce on our side?

Also, which version of Stardog is it?

Thanks for the report,
Pavel

Thank you for your prompt reply Pavel, I need to check about sharing data but it will have to be in private in any case,
If this is possible, what would be the appropriate channel?

wrt the Stardog version we are using the following setup

System Platform: Linux 4.4.0-83-generic,
Java 1.8.0_131
System Architecture: amd64
Stardog Version: 4.2.3

Sure, you can send the data privately. You can also obfuscate it so we won't see any IRIs or literals [1].

But how hard would it be to test this query on Stardog 5.*? The internals changed a lot so this behavior could be affected.

Cheers,
Pavel

[1] Home | Stardog Documentation Latest

My apologies, after more thorough testing it was a bug on our side. There was a big string blob duplicate with only whitespace changes that caused this behavior

1 Like