Closes -- Clarify split_to_map documentation
line length
reflecting PR feedback on wording
@@ -116,14 +116,16 @@ String Functions
Splits ``string`` by ``entryDelimiter`` and ``keyValueDelimiter`` and returns a map.
``entryDelimiter`` splits ``string`` into key-value pairs. ``keyValueDelimiter`` splits
- each pair into key and value.
+ each pair into key and value. Note that ``entryDelimiter`` and ``keyValueDelimiter`` are
+ interpreted literally, i.e., as full string matches.
.. function:: split_to_map(string, entryDelimiter, keyValueDelimiter, function(k, v1, v2, res)) -> map<varchar, varchar>
Splits ``string`` by ``entryDelimiter`` and ``keyValueDelimiter`` and returns a map.
``entryDelimiter`` splits ``string`` into key-value pairs. ``keyValueDelimiter`` splits
- each pair into key and value. ``function(k, v1, v2, res)`` is invoked in cases of duplicate
- keys to resolve the value that should be in the map.
+ each pair into key and value. Note that ``entryDelimiter`` and ``keyValueDelimiter`` are
+ interpreted literally, i.e., as full string matches. ``function(k, v1, v2, res)``
+ is invoked in cases of duplicate keys to resolve the value that should be in the map.
SELECT(split_to_map('a:1;b:2;a:3', ';', ':', (k, v1, v2) -> v1)); -- {"a": "1", "b": "2"}
SELECT(split_to_map('a:1;b:2;a:3', ';', ':', (k, v1, v2) -> CONCAT(v1, v2))); -- {"a": "13", "b": "2"}
@@ -134,6 +136,8 @@ String Functions
containing an array of values for each unique key. ``entryDelimiter`` splits ``string``
into key-value pairs. ``keyValueDelimiter`` splits each pair into key and value. The
values for each key will be in the same order as they appeared in ``string``.
+ Note that ``entryDelimiter`` and ``keyValueDelimiter`` are interpreted literally,
+ i.e., as full string matches.
.. function:: strpos(string, substring) -> bigint
