ironSource / parquetjs

fully asynchronous, pure JavaScript implementation of the Parquet file format
MIT License
351 stars 174 forks source link

UnhandledPromiseRejectionWarning on error #45

Open ZJONSSON opened 6 years ago

ZJONSSON commented 6 years ago

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.
burgrp commented 5 years ago

Just found unhandled promise rejection in ParquetTransformer, line 268:

  _transform(row, encoding, callback) {
    if (row) {
      this.writer.appendRow(row).then(callback);
    } else {
      callback();
    }
  }
ZJONSSON commented 5 years ago

@burgrp you will also find the proposed fix in the reference above, from Feb 1 2018

burgrp commented 5 years ago

Thanks @ZJONSSON . It's a pity, it's not merged yet.

ed-sparkes commented 4 years ago

Any chance of getting this fix merged and new version published ?

emranuddin75 commented 4 years ago

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.

sambonbonne commented 3 years ago

Does anyone have a workaround to handle promise rejection?