parquetjs icon indicating copy to clipboard operation
parquetjs copied to clipboard

Fix ParquetTransformer final multiple callback

Open jeffbski-rga opened this issue 2 years ago • 0 comments

ParquetTransformer _flush method calls the callback directly by passing it in as a parameter and then again calls it as the result to a promise. In earlier versions of Node.js this didn't appear to cause a problem even though technically it was wrong, but Node.js v16 now catches this problem and throws an ERR_MULTIPLE_CALLBACK. The solution is to simply not pass the callback in and only handle it from the promise (on resolve and reject).

jeffbski-rga avatar Jul 12 '22 21:07 jeffbski-rga