-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue #989: Impossible to create array with > 100 items #1001
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creative solution. Looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested it with SET and nested cases as well. Looks good to me 👍🏻 .
@MuhammadTahaNaveed Could you provide me (email) with some of those tests? I will add them to the PR. |
Yeah sure. |
674ef0e
to
4ee7a88
Compare
Fixed issue 989: Impossible to create an object with an array field of more than 100 elements. This issue is due to the function agtype_build_list taking elements as arguments. As the elements can be anything, expressions too, they need to be processed by the transform phase and resolved in the execution phase. As PG has a limitation of 100 function arguments, this restricts the size of arrays built through agtype_build_list. The fix was to break up large lists into segments of 100 items or less and then use the concatenation operator to join them in the execution phase. Added regression tests (thanks Taha!).
Added Taha's additional regression tests. |
Additional tests look good. |
Fixed issue 989: Impossible to create an object with an array field of more than 100 elements.
This issue is due to the function agtype_build_list taking elements as arguments. As the elements can be anything, expressions too, they need to be processed by the transform phase and resolved in the execution phase. As PG has a limitation of 100 function arguments, this restricts the size of arrays built through agtype_build_list.
The fix was to break up large lists into segments of 100 items or less and then use the concatenation operator to join them in the execution phase.
Added regression tests.