File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -69,9 +69,11 @@ impl DiskWriter {
69
69
pub fn write ( & mut self , rb : & RecordBatch ) -> Result < ( ) , StagingError > {
70
70
self . inner . write ( rb) . map_err ( StagingError :: Arrow )
71
71
}
72
+ }
72
73
74
+ impl Drop for DiskWriter {
73
75
/// Write the continuation bytes and mark the file as done, rename to `.data.arrows`
74
- pub fn finish ( & mut self ) {
76
+ fn drop ( & mut self ) {
75
77
if let Err ( err) = self . inner . finish ( ) {
76
78
error ! ( "Couldn't finish arrow file {:?}, error = {err}" , self . path) ;
77
79
return ;
@@ -85,12 +87,6 @@ impl DiskWriter {
85
87
}
86
88
}
87
89
88
- impl Drop for DiskWriter {
89
- fn drop ( & mut self ) {
90
- self . finish ( ) ;
91
- }
92
- }
93
-
94
90
/// Structure to keep recordbatches in memory.
95
91
///
96
92
/// Any new schema is updated in the schema map.
You can’t perform that action at this time.
0 commit comments