Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot write more then once #59

Open
thomascool opened this issue Dec 6, 2018 · 1 comment
Open

cannot write more then once #59

thomascool opened this issue Dec 6, 2018 · 1 comment

Comments

@thomascool
Copy link

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]

@dogenius01
Copy link

Same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants