ok, great. how about this one:
SELECT * {
GRAPH <virtual://austria> {?image a :Images ; :frameId ?frameId }
GRAPH <virtual://austria> {?image :existence ?existence .}
}
ok, great. how about this one:
SELECT * {
GRAPH <virtual://austria> {?image a :Images ; :frameId ?frameId }
GRAPH <virtual://austria> {?image :existence ?existence .}
}
@jess no result this time
Query plan is
> Projection(?image, ?frameId, ?existence) [#36K]
> `─ ServiceJoin [#36K]
> +─ VirtualGraphMongoDB<virtual://austria> [#36212] {
> │ +─ Query=
> │ +─ { $match : {$and : [ {"_id" : {$exists : true, $ne : null}}, {"frameId" : {$exists : true, $ne : null}} ]} },
> │ +─ {$project: {_id: '$_id', frameId: '$frameId'} }
> │ +─ Vars=
> │ +─ ?image <- TEMPLATE(http://austria.com/images/{_id/0})
> │ +─ ?frameId <- COLUMN($1)^^xsd:string
> │ }
> `─ VirtualGraphMongoDB<virtual://austria> [#54319] {
> +─ Query=
> +─ {$unwind: "$existence"},
> +─ { $match : {$and : [ {"_id" : {$exists : true, $ne : null}}, {"existence" : {$exists : true, $ne : null}} ]} }
> +─ Vars=
> +─ ?image <- TEMPLATE(http://austria.com/images/{_id/0})
> +─ ?existence <- COLUMN($1)^^xsd:string
> }
How about this one:
SELECT * {
GRAPH <virtual://austria> {?image a :Images ; :frameId ?frameId }
{ #pragma group.joins
GRAPH <virtual://austria> {?image :existence ?existence . }
}
}
@jess no results again
query plan is
>
> Projection(?image, ?frameId, ?existence) [#36K]
> `─ ServiceJoin [#36K]
> +─ VirtualGraphMongoDB<virtual://austria> [#36212] {
> │ +─ Query=
> │ +─ { $match : {$and : [ {"_id" : {$exists : true, $ne : null}}, {"frameId" : {$exists : true, $ne : null}} ]} },
> │ +─ {$project: {_id: '$_id', frameId: '$frameId'} }
> │ +─ Vars=
> │ +─ ?image <- TEMPLATE(http://austria.com/images/{_id/0})
> │ +─ ?frameId <- COLUMN($1)^^xsd:string
> │ }
> `─ VirtualGraphMongoDB<virtual://austria> [#54319] {
> +─ Query=
> +─ {$unwind: "$existence"},
> +─ { $match : {$and : [ {"_id" : {$exists : true, $ne : null}}, {"existence" : {$exists : true, $ne : null}} ]} }
> +─ Vars=
> +─ ?image <- TEMPLATE(http://austria.com/images/{_id/0})
> +─ ?existence <- COLUMN($1)^^xsd:string
> }
Ok, let's try this one:
SELECT * {
GRAPH <virtual://austria> {?image a :Images ; :frameId ?frameId }
{ select * {
GRAPH <virtual://austria> {?image :existence ?existence . }
} }
}
No output again @jess below is the query plan
Projection(?image, ?frameId, ?existence) [#36K]
`─ ServiceJoin [#36K]
+─ VirtualGraphMongoDB<virtual://austria> [#36212] {
│ +─ Query=
│ +─ { $match : {$and : [ {"_id" : {$exists : true, $ne : null}}, {"frameId" : {$exists : true, $ne : null}} ]} },
│ +─ {$project: {_id: '$_id', frameId: '$frameId'} }
│ +─ Vars=
│ +─ ?image <- TEMPLATE(http://austria.com/images/{_id/0})
│ +─ ?frameId <- COLUMN($1)^^xsd:string
│ }
`─ Projection(?image, ?existence) [#54K]
`─ VirtualGraphMongoDB<virtual://austria> [#54319] {
+─ Query=
+─ {$unwind: "$existence"},
+─ { $match : {$and : [ {"_id" : {$exists : true, $ne : null}}, {"existence" : {$exists : true, $ne : null}} ]} }
+─ Vars=
+─ ?image <- TEMPLATE(http://austria.com/images/{_id/0})
+─ ?existence <- COLUMN($1)^^xsd:string
}```
How about this:
SELECT * {
{ select * {
GRAPH <virtual://austria> {?image a :Images ; :frameId ?frameId }
} }
{ select * {
GRAPH <virtual://austria> {?image :existence ?existence . }
} }
}
@jess yes got the output this time
query plan is
`─ HashJoin(?image) [#36K]
+─ Projection(?image, ?existence) [#54K]
│ `─ VirtualGraphMongoDB<virtual://austria> [#54319] {
│ +─ Query=
│ +─ {$unwind: "$existence"},
│ +─ { $match : {$and : [ {"_id" : {$exists : true, $ne : null}}, {"existence" : {$exists : true, $ne : null}} ]} }
│ +─ Vars=
│ +─ ?image <- TEMPLATE(http://austria.com/images/{_id/0})
│ +─ ?existence <- COLUMN($1)^^xsd:string
│ }
`─ Projection(?image, ?frameId) [#36K]
`─ VirtualGraphMongoDB<virtual://austria> [#36212] {
+─ Query=
+─ { $match : {$and : [ {"_id" : {$exists : true, $ne : null}}, {"frameId" : {$exists : true, $ne : null}} ]} },
+─ {$project: {_id: '$_id', frameId: '$frameId'} }
+─ Vars=
+─ ?image <- TEMPLATE(http://austria.com/images/{_id/0})
+─ ?frameId <- COLUMN($1)^^xsd:string
}```
This looks like a bug with Stardog optimizing queries over MongoDB. I have created issue #8047 to track this. As a workaround, you can use the last query which returns the correct results.
Jess
Oh i see!! Looks like this is the 2nd bug I have found in past 20 days.. Kudos we are improving together!!
LOL..
Good stuff! Thanks for your patience and cooperation.