kuzu
kuzu copied to clipboard
LogicalTypeID Assertion failed on parameterized queries
I encountered this assertion failure when using KuzuPreparedStatement from Java API with parameterized queries where a parameter appears multiple times.
what(): Assertion failed in file "/home/runner/actions-runner/_work/kuzu/kuzu/src/common/types/value/value.cpp" on line 18: dataType->getLogicalTypeID() == LogicalTypeID::ANY
For reference, this is one of the queries that I used:
MATCH
(src:Account {id: $id1})-[edge1:AccountTransferAccount]->(dst:Account {id: $id2}),
(dst)-[edge3:AccountTransferAccount]->(other:Account)-[edge2:AccountTransferAccount]->(src)
WHERE $startTime < edge1.timestamp AND edge1.timestamp < $endTime
AND $startTime < edge2.timestamp AND edge2.timestamp < $endTime
AND $startTime < edge3.timestamp AND edge3.timestamp < $endTime
WITH
other.id AS otherId,
count(edge2) AS numEdge2, sum(edge2.amount) AS sumEdge2Amount, max(edge2.amount) AS maxEdge2Amount,
count(edge3) AS numEdge3, sum(edge3.amount) AS sumEdge3Amount, max(edge3.amount) AS maxEdge3Amount
RETURN otherId, numEdge2, sumEdge2Amount, maxEdge2Amount, numEdge3, sumEdge3Amount, maxEdge3Amount
ORDER BY sumEdge2Amount DESC, sumEdge3Amount DESC, otherId;
It has $startTime and $endTime appear more than once, and when I changed to keep only 1 occurence of them in the query, it ran normally. I also tried with Python API and got the same problem with the queries. It's also noted that I only got this issue with the API packages built on the kuzu-selfhosted-benchmark-runner on uw2. The queries ran normally when I tried with API packages compiled from the source code on my laptop and on ac5.