I want to use Apache Spark/Sedona as a RDBMS within Ontop. For this purpose, I forked a Spark JDBC driver and made it work with Ontop.
The tools work perfectly with normal queries, but not GeoSPARQL ones. The resultset is empty and no exception thrown.
23:30:19.796 |-INFO in i.u.i.o.r.query.impl.OntopTupleQuery - ==> evaluate()
SELECT *
WHERE {
?stop ais:geometry ?geom.
?stop2 ais:geometry ?geom2.
filter(geof:sfWithin(?geom, ?geom2)).
}
limit 100
23:30:19.796 |-INFO in i.u.i.o.r.query.impl.OntopTupleQuery - ==> Parsed query=Slice (limit=100)
Projection
ProjectionElemList
ProjectionElem "stop"
ProjectionElem "geom"
ProjectionElem "stop2"
ProjectionElem "geom2"
Filter
Var (name=geom)
Var (name=geom2)
Join
StatementPattern
Var (name=stop)
Var (name=geom)
StatementPattern
Var (name=stop2)
Var (name=geom2)
23:30:19.823 |-INFO in i.u.i.o.r.query.impl.OntopTupleQuery - ==> stm.execute getRewritingRendering=ans1(stop,geom,stop2,geom2)
SLICE limit=100
JOIN RDF_2_DB_BOOL(GEOF_SF_WITHIN(geom,geom2))
23:30:19.882 |-INFO in i.u.i.o.r.query.impl.OntopTupleQuery - ==> stm.execute getExecutableQuery=ans1(stop,geom,stop2,geom2)
EMPTY [stop, geom, stop2, geom2]
23:30:19.884 |-INFO in i.u.i.o.a.c.impl.QuestStatement - ==> executeSelectQuery
23:30:19.884 |-INFO in i.u.i.o.a.c.impl.QuestStatement - ==> executableQuery=ans1(stop,geom,stop2,geom2)
EMPTY [stop, geom, stop2, geom2]
23:30:19.884 |-INFO in i.u.i.o.a.c.impl.SQLQuestStatement - ++++ extractSQLQuery EMPTY [stop, geom, stop2, geom2]
23:30:19.887 |-INFO in i.u.i.o.r.query.impl.OntopTupleQuery - ==> result.hasNext()=false
23:30:19.888 |-INFO in i.u.i.o.r.query.impl.OntopTupleQuery - ==> endQueryResult
Because there is a problem with the executable query, it isn't sent to the DMBS (I made logs to trace the sql queries received inside the JDBC) .