fallintoplace opened a new pull request, #1011: URL: https://github.com/apache/arrow-go/pull/1011
### Rationale for this change The lazy dictionary converter sizes its backing slice from the requested dictionary index before checking whether that index exists. A bad index can therefore trigger a much larger allocation than the dictionary itself, and the constructor also reserves capacity from the declared entry count before any values are decoded. ### What changes are included in this PR? - Check an index against the decoded entries plus `ValuesLeft` before growing the dictionary. - Grow only by the number of values needed for a valid index. - Remove the eager constructor capacity reservation. ### Are these changes tested? Yes. A focused test verifies that an out-of-range index returns an error without growing the dictionary and that a valid index still decodes normally. -- 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]
