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
We discovered a bug that Match query with size("") throws a QueryExecutionException
Neo4j version: 5.4.0
Operating system: macOS 13.2.1
API/Driver: Java
When I run the following query: MATCH (n:i4P5) WHERE ((n.Wk)%(size(""))) IS NULL RETURN COUNT(n).
A QueryExecutionException is thrown without further message to identify the root cause.
In the stack trace, it reports the code locations at at org.neo4j.cypher.internal.runtime.interpreted.commands.predicates.IsNull.isMatch(Predicate.scala:187).
I guess this exception is triggered because the query has size("") predicate, the size() function should not pass the "", which is like an empty string. But I still think a further message of why this crash is triggered should be prompted? Thanks a lot for your help with further discussion!
Expected behavior:
A further prompt or message should be raised, or no exception should be expected to throw.
Actual behavior:
A QueryExecutionException is thrown. And I'm not really sure whether this problem should happen so I report this.
Caused by: org.neo4j.graphdb.QueryExecutionException
at org.neo4j.kernel.impl.query.QueryExecutionKernelException.asUserException(QueryExecutionKernelException.java:32)
at org.neo4j.cypher.internal.javacompat.ResultSubscriber.converted(ResultSubscriber.java:355)
at org.neo4j.cypher.internal.javacompat.ResultSubscriber.assertNoErrors(ResultSubscriber.java:342)
at org.neo4j.cypher.internal.javacompat.ResultSubscriber.fetchResults(ResultSubscriber.java:311)
at org.neo4j.cypher.internal.javacompat.ResultSubscriber.nextFromSubscriber(ResultSubscriber.java:286)
at org.neo4j.cypher.internal.javacompat.ResultSubscriber.fetchNextOrNull(ResultSubscriber.java:262)
at org.neo4j.cypher.internal.javacompat.ResultSubscriber.fetchNextOrNull(ResultSubscriber.java:57)
at org.neo4j.internal.helpers.collection.PrefetchingIterator.peek(PrefetchingIterator.java:56)
at org.neo4j.internal.helpers.collection.PrefetchingIterator.hasNext(PrefetchingIterator.java:44)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:132)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at ch.cypherchecker.neo4j.Neo4JConnection.execute(Neo4JConnection.java:44)
at ch.cypherchecker.neo4j.Neo4JQuery.executeAndGet(Neo4JQuery.java:52)
... 3 more
Caused by: org.neo4j.kernel.impl.query.QueryExecutionKernelException
... 20 more
Caused by: org.neo4j.exceptions.ArithmeticException
at org.neo4j.cypher.operations.CypherMath.modulo(CypherMath.java:210)
at org.neo4j.cypher.internal.runtime.interpreted.commands.expressions.Modulo.calc(Modulo.scala:27)
at org.neo4j.cypher.internal.runtime.interpreted.commands.expressions.Arithmetics.applyWithValues(Expression.scala:86)
at org.neo4j.cypher.internal.runtime.interpreted.commands.expressions.Arithmetics.apply(Expression.scala:80)
at org.neo4j.cypher.internal.runtime.interpreted.commands.predicates.IsNull.isMatch(Predicate.scala:187)
at org.neo4j.cypher.internal.runtime.interpreted.commands.predicates.CompositeBooleanPredicate.$anonfun$isMatch$2(Predicate.scala:141)
at scala.util.Try$.apply(Try.scala:210)
at org.neo4j.cypher.internal.runtime.interpreted.commands.predicates.CompositeBooleanPredicate.$anonfun$isMatch$1(Predicate.scala:141)
at org.neo4j.cypher.internal.util.NonEmptyList.foldLeftLoop(NonEmptyList.scala:281)
at org.neo4j.cypher.internal.util.NonEmptyList.foldLeft(NonEmptyList.scala:202)
at org.neo4j.cypher.internal.util.NonEmptyList.foldLeft$(NonEmptyList.scala:201)
at org.neo4j.cypher.internal.util.Fby.foldLeft(NonEmptyList.scala:358)
at org.neo4j.cypher.internal.runtime.interpreted.commands.predicates.CompositeBooleanPredicate.isMatch(Predicate.scala:136)
at org.neo4j.cypher.internal.runtime.interpreted.commands.predicates.Predicate.apply(Predicate.scala:101)
at org.neo4j.cypher.internal.runtime.interpreted.commands.predicates.Predicate.apply(Predicate.scala:98)
at org.neo4j.cypher.internal.runtime.interpreted.pipes.FilterPipe.$anonfun$internalCreateResults$1(FilterPipe.scala:34)
at org.neo4j.cypher.internal.runtime.interpreted.pipes.FilterPipe.$anonfun$internalCreateResults$1$adapted(FilterPipe.scala:34)
at org.neo4j.cypher.internal.runtime.ClosingIterator$$anon$3.innerHasNext(ClosingIterator.scala:185)
at org.neo4j.cypher.internal.runtime.ClosingIterator.hasNext(ClosingIterator.scala:135)
at org.neo4j.cypher.internal.runtime.interpreted.pipes.EagerAggregationPipe.internalCreateResults(EagerAggregationPipe.scala:39)
at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.computeDecoratedResult(Pipe.scala:92)
at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:81)
at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.computeDecoratedResult(Pipe.scala:91)
at org.neo4j.cypher.internal.runtime.interpreted.pipes.PipeWithSource.createResults(Pipe.scala:81)
at org.neo4j.cypher.internal.runtime.interpreted.PipeExecutionResult.request(PipeExecutionResult.scala:74)
at org.neo4j.cypher.internal.result.StandardInternalExecutionResult.request(StandardInternalExecutionResult.scala:103)
at org.neo4j.cypher.internal.result.ClosingExecutionResult.request(ClosingExecutionResult.scala:149)
at org.neo4j.cypher.internal.javacompat.ResultSubscriber.fetchResults(ResultSubscriber.java:310)
... 17 more
Caused by: java.lang.ArithmeticException
Steps to reproduce:
We feel sorry that because the database schema and data values are randomly generated by strings, it will cause inconvenience to your reviewing, but we believe the problem does exist.
Following the following graph data generation query, we can reproduce the bugs:
We discovered a bug that Match query with size("") throws a QueryExecutionException
When I run the following query:
MATCH (n:i4P5) WHERE ((n.Wk)%(size(""))) IS NULL RETURN COUNT(n)
.A
QueryExecutionException
is thrown without further message to identify the root cause.In the stack trace, it reports the code locations at
at org.neo4j.cypher.internal.runtime.interpreted.commands.predicates.IsNull.isMatch(Predicate.scala:187)
.I guess this exception is triggered because the query has
size("")
predicate, thesize()
function should not pass the""
, which is like an empty string. But I still think a further message of why this crash is triggered should be prompted? Thanks a lot for your help with further discussion!Expected behavior:
A further prompt or message should be raised, or no exception should be expected to throw.
Actual behavior:
A
QueryExecutionException
is thrown. And I'm not really sure whether this problem should happen so I report this.Steps to reproduce:
We feel sorry that because the database schema and data values are randomly generated by strings, it will cause inconvenience to your reviewing, but we believe the problem does exist.
Following the following graph data generation query, we can reproduce the bugs:
The text was updated successfully, but these errors were encountered: