-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
read_sql_table - datetime index fix and index type checking #4474
Conversation
Could you please add a test, in which a text column is chosen, and so it raises the exception? |
Yes, sure thing. I presume it would sit in here |
Yes exactly |
apologies for the delay - I have added a test which sets the index column to be a character column and checks for the TypeError exception. (first time I have written that sort of test, so I just mimicked what was in there already - hopefully it is along the right lines) |
Looks good, except lint:
|
Ah, missed that step - should be good now. |
Thank you. |
* switched /npartitions and total_seconds() * added check for type before creating divisions * removed comments * added test for character index type error * added blank line at end of file
Fixes #4289
Also added a type check on the index column if
divisions is None
. It will raise aTypeError
if the index column'sdtype.kind
is not in['i', 'u', 'f']
or equal toM
flake8 dask