parquetjs
parquetjs copied to clipboard
UnhandledPromiseRejectionWarning on error
If an error occurs in the ParquetTransformer._transform the stream is left in limbo state. Node logs out the following warning:
(node:10265) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): invalid value for INT64: N/A
(node:10265) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Just found unhandled promise rejection in ParquetTransformer, line 268:
_transform(row, encoding, callback) {
if (row) {
this.writer.appendRow(row).then(callback);
} else {
callback();
}
}
@burgrp you will also find the proposed fix in the reference above, from Feb 1 2018
Thanks @ZJONSSON . It's a pity, it's not merged yet.
Any chance of getting this fix merged and new version published ?
Its a useful change to merge in, and would be very much appreciated to capture the rejection rather than silently dying. Let me now when that would likely to be merged so that i can harden the code.
Does anyone have a workaround to handle promise rejection?