jbonofre opened a new issue, #1458: URL: https://github.com/apache/arrow-java/issues/1458
Follow-up to #1441 (#1439). In `AvaticaParameterBinder.bind(List<TypedValue>, int)`, the `try` block that closes `parameters` on failure before hand-off currently only wraps the per-parameter `bind` loop: - `parameters.setRowCount(index + 1)` calls `setValueCount` on each vector, which can still allocate buffers (for example, child vector buffers of a `FixedSizeListVector` when `null` was bound) and throw `OutOfMemoryException`. - `preparedStatement.setParameters(parameters)` can also throw a `RuntimeException` before `parametersHandedOff` is set to `true`. - The initial parameter count check throws `IllegalStateException` before `parameters` is handed off. Expanding the `try` block to cover the full `bind` method up to `parametersHandedOff = true` ensures `parameters` is always closed on any `RuntimeException` before ownership is transferred to the statement. -- 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]
