YGY-001 opened a new issue, #2604:
URL: https://github.com/apache/age/issues/2604
### Environment
- Apache AGE: 1.8.0
- PostgreSQL: 18.6
- Docker image: apache/age:release_PG18_1.8.0
- Access method: psql
### Description
String comparison results appear inconsistent with Unicode code point order.
For example, uppercase D (U+0044) is less than lowercase a (U+0061), but AGE
returns false for 'D' < 'a'.
### Reproduction
Environment setup:
```cypher
LOAD 'age';
SET search_path = ag_catalog, public;
SELECT create_graph('test');
```
Run:
```cypher
SELECT * FROM cypher('test', $$
RETURN 'D' < 'a' AS upper_before_lower,
'DD' < 'a' AS doubled_before_lower,
'DD' >= 'a' AS doubled_gte_lower
$$) AS (
upper_before_lower agtype,
doubled_before_lower agtype,
doubled_gte_lower agtype
);
```
### Actual result
`false | false | true`
### Expected result
`true | true | false`
### Impact
The comparison also affects predicates over concatenated strings:
SELECT * FROM cypher('test', $$
UNWIND ['D', 'eUu'] AS value
RETURN value,
value + value AS doubled,
NOT ((value + value) >= 'a') AS keep
$$) AS (value agtype, doubled agtype, keep agtype);
AGE returns keep=false for both rows. Based on code point ordering, the
expected values are keep=true for D and keep=false for eUu.
--
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]