Skip to content

Commit 2c75fb4

Browse files
Josipmrdenmatea16
andauthored
Add nullable to map.merge (#1439)
Co-authored-by: Matea Pesic <80577904+matea16@users.noreply.github.com>
1 parent fb2148c commit 2c75fb4

File tree

1 file changed

+5
-3
lines changed
  • pages/advanced-algorithms/available-algorithms

1 file changed

+5
-3
lines changed

pages/advanced-algorithms/available-algorithms/map.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,18 @@ RETURN map.from_pairs([["b", 3], ["c", "c"]]) AS map;
171171
### `merge()`
172172

173173
The procedure merges two maps into one. If the same key occurs twice, the later
174-
value will overwrite the previous one.
174+
value will overwrite the previous one.
175+
176+
If null is provided as an argument, it will resolve to an empty map.
175177

176178
<Callout type="info">
177179
This function is equivalent to **apoc.map.merge**.
178180
</Callout>
179181

180182
{<h4 className="custom-header"> Input: </h4>}
181183

182-
- `first: Map` ➡ A map containing key-value pairs that need to be merged with another map.
183-
- `second: Map` ➡ The second map containing key-value pairs that need to be merged with the key-values from the first map.
184+
- `first: mgp.Nullable[Map]` ➡ A map containing key-value pairs that need to be merged with another map.
185+
- `second: mgp.Nullable[Map]` ➡ The second map containing key-value pairs that need to be merged with the key-values from the first map.
184186

185187
{<h4 className="custom-header"> Output: </h4>}
186188

0 commit comments

Comments
 (0)