apoc.do.case not populating UpdateStatistics
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?
@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
Hey! Thanks for writing in, as of Cypher 25 there is now native support for conditional queries, due to that, there are no plans to update the APOC workaround. I recommend migrating to Cypher as that will contain the correct statistics.