Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix dask
COUNT
queries on windows (#2210)
This commit fixes an issue in the dask cursor that would cause it to return `None` instead of `0` when performing a COUNT() query on Windows. `dask-sql` returns an empty data frame when there are no matches. This is normally translated to 0 in the DaskCursor class when using fetchone with a numeric result. Unfortunately the logic to detect a numeric result did not behave correctly on Windows. The dtype used is int64, which on linux appears to compare equal to int but does not compare equal on Windows. This commit uses `np.issubdtype` to have a more robust check for integer types.
- Loading branch information