You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "mohayu22 (via GitHub)" <gi...@apache.org> on 2023/05/25 13:15:31 UTC
[GitHub] [age] mohayu22 opened a new issue, #949: Increase List Size Limit Beyond 100
mohayu22 opened a new issue, #949:
URL: https://github.com/apache/age/issues/949
In Postgres, there is a limitation that prevents more than 100 arguments from being passed to a function. This limitation also applies to lists and maps constructed using the functions `agtype_build_list` and `agtype_build_map`. As a result, the size of lists and maps is restricted to a maximum of 100 elements.
```
SELECT * FROM cypher('test', $$
RETURN [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
$$) AS (res agtype);
ERROR: cannot pass more than 100 arguments to a function
```
The same restriction applies to map properties.
**Why:**
- A user may have a reading list that includes more than 100 books.
- Neo4j doesn't impose a fixed limit on the number of list items or properties a node can have.
**Implementation:**
Change `agtype_build_list` and `agtype_build_map` to accept one `agtype` argument instead of `VARIADIC "any"`
```
SELECT agtype_build_list('[1, 1, 1]::agtype');
agtype_build_list
-----------------------
["[1, 1, 1]::agtype"]
(1 row)
```
**Setup:**
_Apache AGE (master) - PostgreSQL 11.18_
--
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: dev-unsubscribe@age.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [age] MuhammadTahaNaveed closed issue #949: Increase List Size Limit Beyond 100
Posted by "MuhammadTahaNaveed (via GitHub)" <gi...@apache.org>.
MuhammadTahaNaveed closed issue #949: Increase List Size Limit Beyond 100
URL: https://github.com/apache/age/issues/949
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [age] farooquememon385 commented on issue #949: Increase List Size Limit Beyond 100
Posted by "farooquememon385 (via GitHub)" <gi...@apache.org>.
farooquememon385 commented on issue #949:
URL: https://github.com/apache/age/issues/949#issuecomment-1565602154
the `agtype_build_list` function accepts a maximum of 100 arguments. If you try to pass more than 100 arguments to the `agtype_build_list` function, you will get an error.
You can use the `agtype_build_list_from_array` function instead that does not have this limitation. You can pass any number of arguments to the `agtype_build_list_from_array` function and it will return a list with those values.
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [age] farooquememon385 commented on issue #949: Increase List Size Limit Beyond 100
Posted by "farooquememon385 (via GitHub)" <gi...@apache.org>.
farooquememon385 commented on issue #949:
URL: https://github.com/apache/age/issues/949#issuecomment-1565603621
the `agtype_build_list` function accepts a maximum of 100 arguments. If you try to pass more than 100 arguments to the `agtype_build_list` function, you will get an error.
You can use the `agtype_build_list_from_array` function instead that does not have this limitation. You can pass any number of arguments to the `agtype_build_list_from_array` function and it will return a list with those values.
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [age] Amr-Shams commented on issue #949: Increase List Size Limit Beyond 100
Posted by "Amr-Shams (via GitHub)" <gi...@apache.org>.
Amr-Shams commented on issue #949:
URL: https://github.com/apache/age/issues/949#issuecomment-1563168795
```SQL
SELECT * FROM cypher('test', $$
RETURN $1
$$, '[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]')
$$) AS (res agtype);
```
By passing the list as a single string argument, you are able to bypass this limitation since the entire list is treated as a single argument. The cypher function can then reference the list using a positional placeholder like $1. this is a way around to overcome the limitations of an argument as it makes no scene to pass all the argument and yet they are not stored in a list
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [age] Munmud commented on issue #949: Increase List Size Limit Beyond 100
Posted by "Munmud (via GitHub)" <gi...@apache.org>.
Munmud commented on issue #949:
URL: https://github.com/apache/age/issues/949#issuecomment-1566378846
> the `agtype_build_list` function accepts a maximum of 100 arguments. If you try to pass more than 100 arguments to the `agtype_build_list` function, you will get an error.
>
> You can use the `agtype_build_list_from_array` function instead that does not have this limitation. You can pass any number of arguments to the `agtype_build_list_from_array` function and it will return a list with those values.
@farooquememon385 Can you please give us an example plsease ?
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [age] MuhammadTahaNaveed commented on issue #949: Increase List Size Limit Beyond 100
Posted by "MuhammadTahaNaveed (via GitHub)" <gi...@apache.org>.
MuhammadTahaNaveed commented on issue #949:
URL: https://github.com/apache/age/issues/949#issuecomment-1644262279
Closing this as completed. Fix in PR #1001 .
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org