tilinna opened a new issue, #703: URL: https://github.com/apache/arrow-go/issues/703
### Describe the bug, including details regarding any error messages, version, and platform. Version: github.com/apache/arrow-go/v18 v18.5.2 pqarrow.NewFileWriter accepts an io.Writer, but FileWriter.Close() internally calls TellWrapper.Close() which performs a runtime type assertion and calls Close() on the underlying writer if it satisfies io.WriteCloser. This violates the established Go convention that a writer accepting io.Writer does not own the sink's lifetime. Both gzip.Writer and bufio.Writer write their format trailers in Close() but explicitly leave the underlying io.Writer open — the caller who created the sink is responsible for closing it. Suggested fix: Remove the Close call from TellWrapper.Close(). If closing the underlying writer is intentional, NewFileWriter should accept io.WriteCloser explicitly so the contract is visible to callers. ### Component(s) Parquet -- 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]
