cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Transforming Multi-value Properties - Mistake

Hi,
It's my understanding that the following isn't correct.
Coalesce is documented to return the first non-null from the given arguments. I assume in this case it's to stop the actual split operating on a null.

1 REPLY 1

The operation will return a list with an empty string as its sole element if your properties are null. If the coalesce is not used, the result of split(a, "|") with 'a is null' is a null value.

I would think which you use depends on your requirements. Do you prefer a null property or a property with a list containing an empty string.

You can experiment with the following cypher queries:

return split(coalesce(null, ""), "|") -> [""]
return split(null, "|") -> null

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online