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

PERF: Consider whether to avoid partition.length() in the parquet dispatcher. #4743

Open
mvashishtha opened this issue Aug 1, 2022 · 6 comments
Labels
P2 Minor bugs or low-priority feature requests Performance 🚀 Performance related issues and pull requests.

Comments

@mvashishtha
Copy link
Collaborator

Per @YarShev here, we should probably not call partition.length() to get partition sizes in the parquet dispatcher:

  • Even if we have already materialized the index objects in build_index, ray.get for the already computed size may be expensive (we should check this)
  • If we haven't materialized the index in build_index, the length() call may be unnecessarily blocking (maybe something else will block anyway, though?)
@mvashishtha mvashishtha added the Performance 🚀 Performance related issues and pull requests. label Aug 1, 2022
@anmyachev
Copy link
Collaborator

I found another place that block async execution (dtypes computing if there isn't cache for that):

isinstance(t, kernel_lib.CategoricalDtype) for t in query_compiler.dtypes

@jbrockmendel
Copy link
Collaborator

could we get the dtypes from the parquet file metadata and avoid the need to call compute_dtypes later?

@mvashishtha
Copy link
Collaborator Author

mvashishtha commented Aug 9, 2022

could we get the dtypes from the parquet file metadata and avoid the need to call compute_dtypes later?

@jbrockmendel AFAIK parquet files have their own types that may not necessarily correspond to the types pandas assigns in read_parquet. @pyrito, you were thinking about this too, did you ever find a case where two datasets with the same parquet types get different pandas types after read_parquet?

@pyrito
Copy link
Collaborator

pyrito commented Aug 9, 2022

@mvashishtha @jbrockmendel I was thinking about this. I haven't confirmed this but I was wondering if datetime objects would give us some trouble here, esp when we get into timezones and stuff. These have previously been a pain when I've worked with dask.

@jbrockmendel
Copy link
Collaborator

can you give an example? im guessing you're referring to pandas.DatetimeTZDtype?

@pyrito
Copy link
Collaborator

pyrito commented Aug 11, 2022

@jbrockmendel I don't have a minimum example I could show off the bat, but I was wondering if pandas.DatetimeTZDtype could cause some trouble here. I've had some problems before, but maybe the type mappings are better now between Arrow and pandas.

@pyrito pyrito added the P2 Minor bugs or low-priority feature requests label Aug 31, 2022
anmyachev added a commit to anmyachev/modin that referenced this issue Sep 22, 2022
…atcher

Signed-off-by: Myachev <anatoly.myachev@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Minor bugs or low-priority feature requests Performance 🚀 Performance related issues and pull requests.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants