Rdrg109 created this task.
Rdrg109 added a project: Wikidata-Query-Service.
Restricted Application added a subscriber: Aklapper.
TASK DESCRIPTION
I wish the queries shown in this post were simpler, but I didn't find a
simpler way to reproduce it.
**Steps to replicate the issue** (include links if applicable):
- Execute the following query. Let's call this query "Query 1"
SELECT ?a ?b ?c
WITH {
SELECT * {
VALUES ?a {10 100}.
}
} AS %0
WITH {
SELECT * {
VALUES (?a ?b) {
(100 200)
}
}
} AS %1
WITH {
SELECT * {
VALUES (?a ?c) {
(10 30)
(100 300)
}
}
} AS %2
# Below is what I call the "main query"
{
INCLUDE %0.
OPTIONAL{INCLUDE %2}.
OPTIONAL{INCLUDE %1}.
}
- Execute the following query. Let's call this query "Query 2". The
difference between Query 1 and Query 2 is the order of the `OPTIONAL`
statements in the main query.
SELECT ?a ?b ?c
WITH {
SELECT * {
VALUES ?a {10 100}.
}
} AS %0
WITH {
SELECT * {
VALUES (?a ?b) {
(100 200)
}
}
} AS %1
WITH {
SELECT * {
VALUES (?a ?c) {
(10 30)
(100 300)
}
}
} AS %2
# Below is what I call the "main query"
{
INCLUDE %0.
OPTIONAL{INCLUDE %1}.
OPTIONAL{INCLUDE %2}.
}
At this point, the bug has already been reproduced.
**What happens?**:
Query 1 returns the following result.
| a | b | c |
| --- | --- | --- |
| 10 | | 30 |
| 100 | 200 | 300 |
|
Query 2 returns the following result.
| a | b | c |
| --- | --- | --- |
| 10 | | |
| 100 | 200 | 300 |
|
**What should have happened instead?**:
Query 2 should have returned the same result as Query 1.
**Software version**
+ WDQS version: (current version as of the time of this writing. Sorry, I
don't know how to obtain this information)
+ Blazegraph version: (current version used by WDQS as of the time of this
writing. Sorry, I don't know how to obtain this information)
**Other information** (browser name/version, screenshots, etc.):
I have two hypotheses for the cause of this issue: (1) a bug in Blazegraph
that depends on the version that is being used (2) a modification done by the
Wikibase team to Blazegraph.
In my opinion, (2) makes more sense because LinguaLibre also uses Wikibase
and I could reproduce the issue in https://lingualibre.org/bigdata/#query .
That is, Query 1 produced the first table shown below while Query 2 produced
the second table shown below.
| a | b | c |
| --- | --- | --- |
| 10 | | 30 |
| 100 | 200 | 300 |
|
| a | b | c |
| --- | --- | --- |
| 10 | | |
| 100 | 200 | 300 |
|
For the record, the following code block shows the Blazegraph version that
was reported by https://lingualibre.org/bigdata/#status when I executed Query 1
and Query 2.
text
Build Version=2.1.6-wmf.1
2Build Git Commit=ab0ea16eaf37eacebe20b069eece8772216683ba
Build Git Branch=refs/heads/blazegraph-parent-2.1.6-wmf.1
I couldn't reproduce this issue in http://rdf.geneontology.org/blazegraph.
That is, Query 1 and Query 2 returned the same result (see table below).
| a | b | c |
| --- | --- | --- |
| 10 | | 30 |
| 100 | 200 | 300 |
|
For the record, the following code block shows the Blazegraph version that
was reported by http://rdf.geneontology.org/blazegraph/#status when I executed
Query 1 and Query 2.
text
Build Version=2.1.4
Build Git Commit=738d05f08cffd319233a4bfbb0ec2a858e260f9c
Build Git Branch=N/A
I couldn't reproduce this issue in https://blazegraph.virtualtreasury.ie.
That is, Query 1 and Query 2 returned the same result (see table below).
| a | b | c |
| --- | --- | --- |
| 10 | | 30 |
| 100 | 200 | 300 |
|
For the record, the following code block shows the Blazegraph version that
was reported by https://blazegraph.virtualtreasury.ie/blazegraph/#status when I
executed Query 1 and Query 2.
text
Build Version=2.1.6-SNAPSHOT
Build Git Commit=6b0c935523f5064b80279b30a5175a858cddd2a1
Build Git Branch=refs/heads/BLAZEGRAPH_2_1_6_RC
TASK DETAIL
https://phabricator.wikimedia.org/T323423
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Rdrg109
Cc: Aklapper, Rdrg109, AWesterinen, MPhamWMF, CBogen, Namenlos314, Gq86,
Lucas_Werkmeister_WMDE, EBjune, merbst, Jonas, Xmlizer, jkroll, Wikidata-bugs,
Jdouglas, aude, Tobias1984, Manybubbles
_______________________________________________
Wikidata-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]