cancel
Showing results for 
Search instead for 
Did you mean: 

apoc.custom.declareFunction does not work with APOC 4.4.0.4

I have the following issue with APOC 4.4.0.4

When running the following example code (apoc.custom.declareFunction - APOC Documentation) using the latest APOC 4.4.0.4 library:

CALL apoc.custom.declareFunction(
'double(input::INT) :: INT',
'RETURN $input*2 as answer'
);

I expect the function 'double' to be created without issues.

But when I run this statement I get the following error:

Neo.ClientError.Procedure.ProcedureCallFailed
Failed to invoke procedure apoc.custom.declareFunction : Caused by: org.neo4j.exceptions.SyntaxException: Type mismatch for parameter 'input': expected Float, Integer or Duration but was String (line 1, column 16 (offset: 15))
"EXPLAIN RETURN $input*2 as answer"

This issue does NOT occur when using APOC version 4.4.0.3!!!
Could you please fix this issue?

Versions used

  • OS: MacOS 12.3.1
  • Neo4j: 4.4.5
  • Neo4j-Apoc: 4.4.0.4
1 REPLY 1

giuseppe_villan
Graph Fellow
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.