You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
drop class Country if exists unsafe;
create class Country extends V;
create property Country.name STRING;
create property Country.geometry EMBEDDED OMultiPolygon;
drop class POI if exists unsafe;
create class POI extends V;
create property POI.name STRING;
create property POI.location EMBEDDED OPoint;
insert into POI(name, location) values(“zeropoint”, St_GeomFromText(“Point(0 0)”));
insert into Country(name, geometry) values(“zeroland”, St_GeomFromText(“MultiPolygon(((1 1, 1 -1, -1 -1, -1 1, 1 1)))”));
CREATE INDEX POI.location ON POI(location) SPATIAL ENGINE LUCENE;
CREATE INDEX Country.geometry ON Country(geometry) SPATIAL ENGINE LUCENE;
let name = select name from Country where ST_Contains(geometry, (select location from POI)) = true;
return $name;
Throws exception:
java.lang.NullPointerException
at com.orientechnologies.orient.core.sql.executor.FetchFromIndexedFunctionStep.init(FetchFromIndexedFunctionStep.java:100)
at com.orientechnologies.orient.core.sql.executor.FetchFromIndexedFunctionStep.syncPull(FetchFromIndexedFunctionStep.java:38)
at com.orientechnologies.orient.core.sql.executor.FilterByClustersStep$1.fetchNextItem(FilterByClustersStep.java:57)
at com.orientechnologies.orient.core.sql.executor.FilterByClustersStep$1.hasNext(FilterByClustersStep.java:93)
at com.orientechnologies.orient.core.sql.executor.FilterByClassStep$1.fetchNextItem(FilterByClassStep.java:50)
at com.orientechnologies.orient.core.sql.executor.FilterByClassStep$1.hasNext(FilterByClassStep.java:88)
at com.orientechnologies.orient.core.sql.executor.ProjectionCalculationStep$1.hasNext(ProjectionCalculationStep.java:33)
at com.orientechnologies.orient.core.sql.parser.OLocalResultSet.fetchNext(OLocalResultSet.java:40)
at com.orientechnologies.orient.core.sql.parser.OLocalResultSet.(OLocalResultSet.java:30)
at com.orientechnologies.orient.core.sql.parser.OSelectStatement.execute(OSelectStatement.java:276)
at com.orientechnologies.orient.core.sql.parser.OStatement.execute(OStatement.java:79)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.command(ODatabaseDocumentEmbedded.java:567)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.executeStatement(OServerCommandPostCommand.java:189)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommand.execute(OServerCommandPostCommand.java:95)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostCommandGraph.execute(OServerCommandPostCommandGraph.java:36)
at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:228)
at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:707)
at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:69)
Query select name from Country where ST_Contains(geometry, “POINT(0 0)”) = true
executes without errors.
The text was updated successfully, but these errors were encountered:
select name from Country LET $foo = (select * from POI) where ST_Contains(geometry, $foo[0].location) = true
and
select name from Country where ST_Contains(geometry, (select location from POI)) = true
For this one the limitation is that the result of the inner query should contain 1 record, since the geospatial functions does not support a collection in input.
It will be available in the next release 3.0.28 or in snapshot
OrientDB Version: 3.0.27
Java Version: jdk1.8.0_231
OS: windows 10
Expected behavior
Batch executes without errors
Actual behavior
NPE thrown
Steps to reproduce
Throws exception:
Query
select name from Country where ST_Contains(geometry, “POINT(0 0)”) = true
executes without errors.
The text was updated successfully, but these errors were encountered: