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

Added parquet format #27

Merged
merged 4 commits into from
Jun 16, 2020
Merged

Added parquet format #27

merged 4 commits into from
Jun 16, 2020

Conversation

dim
Copy link
Member

@dim dim commented Jun 15, 2020

No description provided.


private

def read_table
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the big downside of reading Parquet in Ruby that you MUST load the whole file into memory which is 💩. Nothing we can do about it, but something to keep in mind.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as long as the input data is partitioned sensibly we should be ok

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parquet sucks! Is there any reason the devs wouldn't update to add stream support? Is there a something about the implementation that requires it to be in memory?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msg = msg.to_parquet(@schema, **opts) if msg.respond_to?(:to_parquet)

res = @batch.push(msg)
flush_table if @batch.size >= @batch_size
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the writer side, we can work in batches. It's not ideal but at least it's a viable method.

Copy link
Contributor

@jpmedforth jpmedforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and make sense.

@dim dim merged commit 37ba5b6 into master Jun 16, 2020
@dim dim deleted the feature/parquet branch May 4, 2021 10:19
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.

3 participants