Open justin2004 opened 2 years ago
here is the expected output:
The reason I think this should work is that the calls to bind()
in this query don't alter the results of the outer service.
PREFIX xyz: <http://sparql.xyz/facade-x/data/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX fx: <http://sparql.xyz/facade-x/ns/>
PREFIX ex: <http://example.com/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX wd: <http://www.wikidata.org/entity/> # Wikibase entity - item or property.
PREFIX wdt: <http://www.wikidata.org/prop/direct/> # Truthy assertions about the data, links entity to value directly.
select *
WHERE
{ SERVICE <https://query.wikidata.org/sparql>
{
SERVICE <https://query.wikidata.org/sparql>{
wd:Q1 wdt:P1889 ?o .
bind(bnode() as ?a)
bind(struuid() as ?b)
}
?o ?p wd:Q1426992 .
}
} limit 50
I've investigated a little bit the issue without figuring out the problem! I've just modified the query a bit to make it work, but this is very strange. I doubt that it can depend on sparql anything.
I've investigated a little bit the issue without figuring out the problem!
haha. love that cheerfulness.
I doubt that it can depend on sparql anything.
ah, you think it is a jena bug?
The query posted originally by @justin2004 https://github.com/SPARQL-Anything/sparql.anything/issues/241#issue-1190925086 doesn't work on v0.9-DEV -- I get SO:
$ fx -q issue241_retrying.sparql
[main] INFO io.github.sparqlanything.model.Triplifier - Running command: bash -c echo 4,5,6
[main] INFO io.github.sparqlanything.model.Triplifier - Command stderr:
[main] INFO io.github.sparqlanything.model.Triplifier - Running command: bash -c echo 4,5,6
[main] INFO io.github.sparqlanything.model.Triplifier - Command stderr:
[main] INFO io.github.sparqlanything.model.Triplifier - Running command: bash -c echo 4,5,6
[main] INFO io.github.sparqlanything.model.Triplifier - Command stderr:
[main] INFO io.github.sparqlanything.model.Triplifier - Running command: bash -c echo 4,5,6
[main] INFO io.github.sparqlanything.model.Triplifier - Command stderr:
s,p,num,second_cmd,ss,pp,oo
Exception in thread "main" java.lang.StackOverflowError
at org.apache.jena.sparql.engine.binding.BindingBase.get(BindingBase.java:111)
In addition, explain -e
does not show anything, I wanted to check the algebra...
I've investigated a little bit the issue without figuring out the problem!
haha. love that cheerfulness.
:-D
I doubt that it can depend on sparql anything.
ah, you think it is a jena bug?
Not sure, but the query breaks when BNODE or strUUID functions are used in BIND. SA engine does operate on extend operations and BNODE strUUID are standard SPARQL functions.
The query posted originally by @justin2004 #241 (comment) doesn't work on v0.9-DEV -- I get SO:
Maybe because ?num matches with URIs (fx:root) and container blank nodes. This is then concatenated with seq some strange behaviour.
Maybe because ?num matches with URIs (fx:root) and container blank nodes. This is then concatenated with seq some strange behaviour.
Actually, the following change makes it work:
PREFIX fx: <http://sparql.xyz/facade-x/ns/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xyz: <http://sparql.xyz/facade-x/data/>
SELECT *
WHERE
{
SERVICE <x-sparql-anything:>
{
SERVICE <x-sparql-anything:>
{ fx:properties
fx:command "echo 4,5,6" ;
fx:media-type "text/csv" .
[] fx:anySlot [ ?p ?num ] .
# BIND(bnode() AS ?bob) # breaks
# BIND(struuid() AS ?bob) # breaks
# BIND(concat("a","b") AS ?bob) # works
# BIND("lala" AS ?bob) # works
}
BIND(concat("seq ", ?num) AS ?second_cmd)
fx:properties
fx:command ?second_cmd ;
fx:media-type "text/plain" ;
fx:txt.split "\n" .
?ss ?pp ?oo
}
}
It is similar to that included via 9ddd3ee
It is similar to that included via 9ddd3ee
Oh I didn't notice you went through it already
No problem, hope you will figure out the problem.
This works as expected:
but if you uncomment the calls to
bind()
one at a time some of them cause the outer service to not return any results. That is, all the results come from the inner service.