You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JdbcToArrowUtils::updateVector(VarCharVector, String, boolean, int) does not release the memory that it allocates for the NullableVarCharHolder. This can be verified by changing the first lines of JdbcToArrowTest::testJdbcToArrowValues() to the following:
The leak can be fixed by closing the buffer in updateVector. However, I would propose to not use the NullableVarCharHolder in the first place because it creates an unnecessary copy of the string. Instead, I would use BaseVariableWidthVector::setSafe(int index, byte[] value) and BaseVariableWidthVector::setNull(int index) directly.
In addition, I would propose to check for leaks in JdbcToArrowTest.
I am willing to create a patch, so please let me know what approach is preferred.
Todd Farmer / @toddfarmer:
This issue was last updated over 90 days ago, which may be an indication it is no longer being actively worked. To better reflect the current state, the issue is being unassigned. Please feel free to re-take assignment of the issue if it is being actively worked, or if you plan to start that work soon.
JdbcToArrowUtils::updateVector(VarCharVector, String, boolean, int)
does not release the memory that it allocates for theNullableVarCharHolder
. This can be verified by changing the first lines ofJdbcToArrowTest::testJdbcToArrowValues()
to the following:The leak can be fixed by closing the buffer in
updateVector
. However, I would propose to not use theNullableVarCharHolder
in the first place because it creates an unnecessary copy of the string. Instead, I would useBaseVariableWidthVector::setSafe(int index, byte[] value)
andBaseVariableWidthVector::setNull(int index)
directly.In addition, I would propose to check for leaks in JdbcToArrowTest.
I am willing to create a patch, so please let me know what approach is preferred.
Reporter: Johannes Luong / @jmaschad
Note: This issue was originally created as ARROW-5536. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: