selendym opened a new issue, #240:
URL: https://github.com/apache/age/issues/240
**Describe the bug**
Negative indices on arrays seem to return nothing/null.
**How are you accessing AGE (Command line, driver, etc.)?**
With `psql` from the docker image. One container for the server and another
one for the client.
**What data setup do we need to do?**
```pgsql
select * from ag_catalog.create_graph('g');
```
**What is the necessary configuration info needed?**
Just the docker image built from master branch.
**What is the command that caused the error?**
```pgsql
select * from ag_catalog.cypher('g', $$ with [0, 1, 2, 3] as l return l[-1]
$$) as (r0 ag_catalog.agtype);
```
The above returns (note the empty line):
```text
r0
----
(1 row)
```
Compare with:
```pgsql
select * from ag_catalog.cypher('g', $$ with [0, 1, 2, 3] as l return l[3]
$$) as (r0 ag_catalog.agtype);
select * from ag_catalog.cypher('g', $$ with [0, 1, 2, 3] as l return
l[-1..] $$) as (r0 ag_catalog.agtype);
```
which return:
```text
r0
----
3
(1 row)
```
and:
```
r0
-----
[3]
(1 row)
```
**Expected behavior**
The negative index should work as described in:
https://age.apache.org/docs/master/intro/types.html#negative-index-access
**Environment (please complete the following information):**
- env: docker
- branch: master
- commit: 6fbdfa83d467981fb52f4318f9464bb2c9a031d9
--
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]