mmustafasenoglu opened a new pull request, #2569:
URL: https://github.com/apache/age/pull/2569
Fixes #2568
## Problem
`age_split()` passes the delimiter verbatim to PostgreSQL's
`regexp_split_to_array()`, which compiles it as a regular expression. This
causes:
- `split('a.b.c', '.')` → `["", "", "", "", "", ""]` (dot matches every char)
- `split('a+b+c', '+')` → ERROR (invalid regex quantifier)
- `split('a|b', '|')` → `["a", "|", "b"]` (alternation splits at every
position)
Meanwhile, `age_replace()` treats the same delimiter literally, making the
two functions internally inconsistent.
openCypher defines the split delimiter as a **literal string**, matching
Neo4j, Memgraph, and FalkorDB behavior.
## Fix
Replace `regexp_split_to_array` with `string_to_array` in `age_split()`.
PostgreSQL's `string_to_array` treats the delimiter as a plain literal string,
which is the correct openCypher semantics.
## Test
Added regression tests for regex metacharacter delimiters: `. `, `|`, `+`,
and multi-dot `a.b.c.d`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]