Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions parquet/file/file_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ func (fw *Writer) AppendKeyValueMetadata(key string, value string) error {
}

// Close closes any open row group writer and writes the file footer. Subsequent
// calls to close will have no effect.
// calls to close will have no effect. If the underlying writer implements [io.Closer],
// then this will also call Close on the underlying writer.
func (fw *Writer) Close() (err error) {
if fw.open {
// if any functions here panic, we set open to be false so
Expand All @@ -250,7 +251,7 @@ func (fw *Writer) Close() (err error) {

err = fw.FlushWithFooter()
}
return nil
return
}

// FileMetadata returns the current state of the FileMetadata that would be written
Expand Down
3 changes: 2 additions & 1 deletion parquet/pqarrow/file_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,8 @@ func (fw *FileWriter) AppendKeyValueMetadata(key string, value string) error {
}

// Close flushes out the data and closes the file. It can be called multiple times,
// subsequent calls after the first will have no effect.
// subsequent calls after the first will have no effect. If the underlying writer implements
// [io.Closer], then this will also call Close on the underlying writer.
func (fw *FileWriter) Close() error {
if !fw.closed {
fw.closed = true
Expand Down