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

Wrong type for onComplete when called with rowFormat: 'object' #28

Open
platypii opened this issue Aug 15, 2024 · 0 comments
Open

Wrong type for onComplete when called with rowFormat: 'object' #28

platypii opened this issue Aug 15, 2024 · 0 comments

Comments

@platypii
Copy link
Collaborator

The type change in #25 caused a lot of downstream type errors.

Previously in v1.1.1 there was only any[][] types returned to onComplete.

Then in v1.2.0 we updated the type to any[][] | Record<string, any> but any project which was passing an onComplete function with expected type any[][] was throwing a typescript error, and was not easy to fix.

In v1.2.1 I reverted the type change, but left the behavior of rowFormat: 'object' where it will return Record<string, any>[] instead of any[][]. This means the types are not consistent with behavior in that case.

I don't know how I want to fix this yet. But I refuse to break downstream projects that depend on the types.

I think I will start looking at making a new entry point to hyparquet. I want the rows to be returned as a promise instead of a callback. But this may also be a good opportunity to fix the awkwardness of the current parquetRead function.

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

1 participant