diff --git a/lib/writer.js b/lib/writer.js index 130d328e..984b17c8 100644 --- a/lib/writer.js +++ b/lib/writer.js @@ -111,7 +111,7 @@ class ParquetWriter { * method twice on the same object or add any rows after the close() method has * been called */ - async close(callback) { + async close() { if (this.closed) { throw 'writer was closed'; } @@ -128,10 +128,6 @@ class ParquetWriter { await this.envelopeWriter.writeFooter(this.userMetadata); await this.envelopeWriter.close(); this.envelopeWriter = null; - - if (callback) { - callback(); - } } /** @@ -313,7 +309,7 @@ class ParquetTransformer extends stream.Transform { } _flush(callback) { - this.writer.close(callback) + this.writer.close() .then(d => callback(null, d), callback); }