The Jena Adapter supports the BIND clause. Oracle 11g Database, however, does not support BIND directly so Jena Adapter ends up using ARQ to handle the BIND. Unfortunately, the orageo functions are not recognized. (String operations, calculations, etc. are supported though.)
The FILTER case works because the database supports it and we push the expression down to the database.
BTW, syntax wise, you may want to use something like:
BIND(orageo:distance (?geom1, ?geom2, "KM") as ?dist2)
Hope it clarifies,
Zhe, Thanks for the update.
You are correct on the updated syntax... it was a cut/paste issue on my part, in my running example, I had the "?" on the variables... :-/
What I want to do is to use some of the geospatial commands in the bind clause... You say that it does not support the orageo functions, but does it support any of the standard geosparql functions?
Back to your response...
If you push the FILTER to the database, is that applied before the graph is created?
In normal Jena execution, the FILTER is applied to the graph results after the query(s) run. Does Oracle change the query plan to execute the FILTER before the rest of the graph is queried/analyzed?
I don't think Jena 2.7.2 has support of geosparql functions.
Regarding the execution order (with respect to FILTER clause vs other query patterns), Oracle converts SPARQL queries into
SQL queries and the execution plan (order, join methods, etc.) is decided transparently by the optimizer. It is possible, however, to
influence the execution plan through query hints.
Hope it helps,