Github user viirya commented on the pull request: https://github.com/apache/spark/pull/3600#issuecomment-66446898 I do know that `finalize` can close wrapped stream. I did not say it would not. But It only can if you implement it as that. There is no such implicit contract as I know. As the discussions I included in previous comment show, some InputStream implement `finalize` and some not. You can not reply on a specified implementation found in few InputStream types to generalize the behavior to all InputStream types. And there is an obvious example, `DeserializationStream`, which does not implement the "implicit contract." If this PR would cause problem, I just want to know why and where it is. You said `DeserializationStream` would cause problem if it goes out of scope, I just show you that the problem you mentioned is not the case, as the codes show.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org