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

specify dtype when deciding division using np.linspace in read_sql_query #8940

Merged
merged 1 commit into from Apr 18, 2022

Conversation

cheunhong
Copy link
Contributor

  • Closes #xxxx
  • Tests added / passed
  • Passes pre-commit run --all-files

The current logic on deciding the divisions in dd.read_sql_query will result in a float array by default, without any possible way of specifying the dtype that we want, that is generally bad when filtering on the usual integer index of a sql database.

Fix:
Specifying the dype in np.linspace so that the divisions array will be the same dtype as the limits or the index_col.

@GPUtester
Copy link
Collaborator

Can one of the admins verify this patch?

Copy link
Member

@jsignell jsignell left a comment

Choose a reason for hiding this comment

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

This looks good to me!

@jsignell
Copy link
Member

ok to test

@jsignell jsignell merged commit b0e234f into dask:main Apr 18, 2022
@jsignell
Copy link
Member

Thank you @cheunhong for this contribution! Welcome to dask :)

@cheunhong cheunhong deleted the dd-read_sql_query-provide-improvement branch April 19, 2022 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants