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

Provide the readInt8 function call in plain_dictionary codec with arguments #43

Merged
merged 1 commit into from
Apr 21, 2020

Conversation

kevincfz
Copy link

@kevincfz kevincfz commented Apr 21, 2020

In codec/plain_dictionary.js, we are calling: readInt8() without argument:

opts.bitWidth = cursor.buffer.slice(cursor.offset, cursor.offset+1).readInt8();

This is fine for node.js, because its readInt8()method has a default argument of offset = 0. See https://github.com/nodejs/node/blob/master/lib/internal/buffer.js#L411.

But when using this package in browser, it breaks because the buffer method (provided by shim packages) does not have such a default argument. For example: https://github.com/feross/buffer/blob/master/index.js#L1221

Accepting this change will make this package compatible to use in browser.

@ZJONSSON
Copy link
Owner

Excellent @FZSS thank you!

@ZJONSSON ZJONSSON merged commit e5c4344 into ZJONSSON:master Apr 21, 2020
@kevincfz
Copy link
Author

appreciate the prompt response! If you haven’t done so, can you consider publishing an updated version to npm?

@ZJONSSON
Copy link
Owner

published as + parquetjs-lite@0.8.7
Keep in mind that the branch published is parquetjs-lite

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

Successfully merging this pull request may close these issues.

None yet

2 participants