node-parquet icon indicating copy to clipboard operation
node-parquet copied to clipboard

cannot write more then once

Open thomascool opened this issue 6 years ago • 1 comments

based on the example on the readme:

var parquet = require('node-parquet');

var schema = { small_int: {type: 'int32', optional: true}, big_int: {type: 'int64'}, my_boolean: {type: 'bool'}, name: {type: 'byte_array', optional: true}, };

var data = [ [ 1, 23234, true, 'hello world'], [ , 1234, false, ], ];

var writer = new parquet.ParquetWriter('my_file.parquet', schema); writer.write(data); writer.close();

Here will be the output:

$ ./node_modules/node-parquet/bin/parquet.js cat ./my_file.parquet [1,23234,true,"hello world"] [null,1234,false,null]

If write it three times like below: writer.write(data); writer.write(data); writer.write(data); writer.close();

The output will be nulls after first write: $ ./node_modules/node-parquet/bin/parquet.js cat ./my_file.parquet [1,23234,true,"hello world"] [null,1234,false,null] [null,null,null,null] [null,null,null,null] [null,null,null,null] [null,null,null,null]

thomascool avatar Dec 06 '18 00:12 thomascool

Same issue.

dogenius01 avatar Dec 17 '18 05:12 dogenius01