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

Memoize dask datashape #801

Merged
merged 3 commits into from
Oct 4, 2019
Merged

Memoize dask datashape #801

merged 3 commits into from
Oct 4, 2019

Conversation

philippjfr
Copy link
Member

As suggested in #797

@philippjfr philippjfr changed the title Philippjfr/memoize datatype Memoize dask datashape Oct 4, 2019
@philippjfr
Copy link
Member Author

Okay, the previous approach still wasn't saved. This new approach loads all the categories into memory in a way that is probably less efficient but guaranteed to be correct, but then adds memoization so you only pay the cost once.

@jbednar
Copy link
Member

jbednar commented Oct 4, 2019

Does that mean that we have to forgo the speedups when reading fastparquet-written files with fastparquet, in order to make the other cases safe? Or can we have both the speedup in the best case and the correctness in the other cases?

@philippjfr
Copy link
Member Author

Does that mean that we have to forego the speedups when reading fastparquet-written files with fastparquet, in order to make the other cases safe?

I would assume that fastparquet categorical columns are known at the time of load so we would get the benefit but I'll have to test that assumption.

@philippjfr
Copy link
Member Author

I would assume that fastparquet categorical columns are known at the time of load so we would get the benefit but I'll have to test that assumption.

This assumption was wrong but loading the categories using fastparquet is significantly faster than with pyarrow (although pyarrow seems to be faster than fastparquet in general). Therefore I do think it must be using the metadata in some form.

@philippjfr philippjfr merged commit 2480c33 into master Oct 4, 2019
@maximlt maximlt deleted the philippjfr/memoize_datatype branch December 25, 2021 17:21
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.

2 participants