neo4j / apoc

Apache License 2.0
81 stars 27 forks source link

apoc.do.case not populating UpdateStatistics #630

Open UniqueConstraint opened 3 months ago

UniqueConstraint commented 3 months ago

An apoc.do.case statement, to merge relationships based on matching relationship properties, is not producing any UpdateStatistics e.g. relationshipCreated. All values in UpdateStatistics return zero.

I noticed other apoc functionality have versions with stats e.g. apoc.merge.relationshipWithStats

Is there a workaround or fix for apoc.do.case?

Lojjs commented 3 months ago

@UniqueConstraint That update statistics are not shown in general for procedures is not a bug, but a known limitation of the Neo4j procedure framework. It is tracked internally as a future improvement to do for the procedure framework. I suppose that the withStats versions of some procedures as you mention is a workaround of sorts for these specific procedures but I am unfortunately not aware of any general workaround.

If you wish I could track adding withStats versions for more APOC procedures as a feature request, but as APOC core is currently in maintenance mode with only a limited number of people working on it (focusing on support), it is not anything that will happen soon.

Best regards Louise, Neo4j