Sure. `file` needs to be closed, otherwise it is a memory leak. Closing it closes the descriptor `fd` but the descriptor is what this function is supposed to return. So we need a copy, close `file` and thus `fd`, and return the copy. The real question is: why do we even need `file`? But there's a check based on that stream so I assume there is a good reason.
[ Full content available at: https://github.com/apache/arrow/pull/2466 ] This message was relayed via gitbox.apache.org for [email protected]
