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
It seems the SQL query parse for MATCH cant work with embeddedmap in WHERE clause
Simple test database:
create class NNode extends V;
create class EEdge extends E;
create property EEdge.series embeddedmap;
create property EEdge.name string;
let N1 = create vertex NNode set id=1;
let N2 = create vertex NNode set id=2;
create edge EEdge from $N1 to $N2 set series={"1":"one","2":"two"},name="Mike";
The following query throws an exception: MATCH {class:NNode,as:BaseNode, where:(id=1)}.outE(){as:MyEdge,where:($currentMatch.series["1"]="one")} return $matches;
while the following working as expected: MATCH {class:NNode,as:BaseNode, where:(id=1)}.outE(){as:MyEdge,where:($currentMatch.name="Mike")} return $matches;
The first query (embeddedmap stuff involved) throws the following server exception:
java.lang.NullPointerException
at com.orientechnologies.orient.core.sql.parser.OArraySingleValuesSelector.execute(OArraySingleValuesSelector.java:56)
at com.orientechnologies.orient.core.sql.parser.OModifier.execute(OModifier.java:89)
at com.orientechnologies.orient.core.sql.parser.OModifier.execute(OModifier.java:94)
at com.orientechnologies.orient.core.sql.parser.OBaseExpression.execute(OBaseExpression.java:109)
at com.orientechnologies.orient.core.sql.parser.OExpression.execute(OExpression.java:68)
at com.orientechnologies.orient.core.sql.parser.OBinaryCondition.evaluate(OBinaryCondition.java:44)
at com.orientechnologies.orient.core.sql.parser.ONotBlock.evaluate(ONotBlock.java:33)
at com.orientechnologies.orient.core.sql.parser.OAndBlock.evaluate(OAndBlock.java:34)
at com.orientechnologies.orient.core.sql.parser.OOrBlock.evaluate(OOrBlock.java:36)
at com.orientechnologies.orient.core.sql.parser.OAndBlock.evaluate(OAndBlock.java:34)
at com.orientechnologies.orient.core.sql.parser.OWhereClause.matchesFilters(OWhereClause.java:54)
at com.orientechnologies.orient.core.sql.executor.MatchEdgeTraverser.matchesFilters(MatchEdgeTraverser.java:302)
at com.orientechnologies.orient.core.sql.executor.MatchEdgeTraverser$1.fetchNext(MatchEdgeTraverser.java:172)
at com.orientechnologies.orient.core.sql.executor.MatchEdgeTraverser$1.hasNext(MatchEdgeTraverser.java:148)
at com.orientechnologies.orient.core.sql.executor.MatchEdgeTraverser.hasNext(MatchEdgeTraverser.java:41)
at com.orientechnologies.orient.core.sql.executor.MatchStep.fetchNext(MatchStep.java:108)
at com.orientechnologies.orient.core.sql.executor.MatchStep.access$000(MatchStep.java:13)
at com.orientechnologies.orient.core.sql.executor.MatchStep$1.hasNext(MatchStep.java:45)
at com.orientechnologies.orient.core.sql.executor.ReturnMatchPatternsStep$1.hasNext(ReturnMatchPatternsStep.java:24)
at com.orientechnologies.orient.core.sql.executor.OScriptExecutionPlan.doExecute(OScriptExecutionPlan.java:89)
at com.orientechnologies.orient.core.sql.executor.OScriptExecutionPlan.fetchNext(OScriptExecutionPlan.java:49)
at com.orientechnologies.orient.core.sql.parser.OLocalResultSet.fetchNext(OLocalResultSet.java:35)
at com.orientechnologies.orient.core.sql.parser.OLocalResultSet.(OLocalResultSet.java:29)
at com.orientechnologies.orient.core.command.OSqlScriptExecutor.execute(OSqlScriptExecutor.java:55)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.execute(ODatabaseDocumentEmbedded.java:619)
at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostBatch.execute(OServerCommandPostBatch.java:203)
at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:223)
at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:702)
at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:69)
The text was updated successfully, but these errors were encountered:
OrientDB Version: 3.0.18
Java Version: 1.8.0_181
OS: Ubuntu 16.04
It seems the SQL query parse for MATCH cant work with embeddedmap in WHERE clause
Simple test database:
The following query throws an exception:
MATCH {class:NNode,as:BaseNode, where:(id=1)}.outE(){as:MyEdge,where:($currentMatch.series["1"]="one")} return $matches;
while the following working as expected:
MATCH {class:NNode,as:BaseNode, where:(id=1)}.outE(){as:MyEdge,where:($currentMatch.name="Mike")} return $matches;
The first query (embeddedmap stuff involved) throws the following server exception:
The text was updated successfully, but these errors were encountered: