asubiotto commented on PR #38729: URL: https://github.com/apache/arrow/pull/38729#issuecomment-1814051063
I think it is possible but I'm not sure there is a simple and elegant way to do so. Some things I've considered: 1) Attaching some sort of verifier to the decompressors behind a compile-time debug check (given this package uses that pattern already). When enabled, it would attach a finalizer to the decompressor object and verify it has been closed. However, this would probably require changing the `decompressor` interface and I'm not sure I like that. 2) Add some sort of compressor provider interface that is swapped out during tests with a wrapper over the `decompressor` interface that is verified in a defer (sort of like a `CheckedAllocator`). I'm not a fan of adding more interfaces where they're not really needed and this solution would require tests to create/defer themselves (unless we put this in a global var that is verified in `TestMain`) Technically, this is not a correctness issue so I don't think a test is required here given the overhead. I'll maybe write up a benchmark though since it could be useful for other cases. -- 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]
