skale-me / node-parquet

NodeJS module to access apache parquet format files
Apache License 2.0
57 stars 11 forks source link

crash when using int96 #30

Open rafiton opened 7 years ago

rafiton commented 7 years ago

Installed and compiled on Amazon linux. Whenever I try to use int96 to store timestamp node crashes:

Using Node 8.x.x and 6.x.x

/home/ec2-user/.nvm/versions/node/v8.1.4/bin/node[15317]: ../src/node_buffer.cc:220:char node::Buffer::Data(v8::Local): Assertion `obj->IsArrayBufferView()' failed. 1: node::Abort() [/home/ec2-user/.nvm/versions/node/v8.1.4/bin/node] 2: node::Assert(char const const () [4]) [/home/ec2-user/.nvm/versions/node/v8.1.4/bin/node] 3: node::Buffer::Length(v8::Local) [/home/ec2-user/.nvm/versions/node/v8.1.4/bin/node] 4: 0x7f2e12e39d41 [/home/ec2-user/bidder/node_modules/node-parquet/build/Release/parquet.node] 5: ParquetWriter::Write(Nan::FunctionCallbackInfo const&) [/home/ec2-user/bidder/node_modules/node-parquet/build/Release/parquet.node] 6: 0x7f2e12e39b57 [/home/ec2-user/bidder/node_modules/node-parquet/build/Release/parquet.node] 7: v8::internal::FunctionCallbackArguments::Call(void ()(v8::FunctionCallbackInfo const&)) [/home/ec2-user/.nvm/versions/node/v8.1.4/bin/node] 8: 0xb43f48 [/home/ec2-user/.nvm/versions/node/v8.1.4/bin/node] 9: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object*, v8::internal::Isolate) [/home/ec2-user/.nvm/versions/node/v8.1.4/bin/node] 10: 0x2efe9ab840bd

mvertes commented 7 years ago

Ok. You do not mention if the bug occurs at read or write, and the schema/data you used. Could you provide a small regression test using test/int32-write.js as a model, to help reproduction and validation ? If the bug occurs at reading, please also provide a small sample file, or better: a script (as above) to generate it. Your test could then be added to the set of automatic non-regression tests. Thanks for your feedback and contribution

rafiton commented 7 years ago

Hi Marc, I suspect that it is a larger issue with integers in general (opened a different issue on that)

Rafi