Skip to content

BUG: Explicitly use 64bit integers when converting from BQ types #121

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

Merged
merged 1 commit into from
Feb 15, 2018

Conversation

blose
Copy link
Contributor

@blose blose commented Feb 15, 2018

Solved issue #119
On 64-bit windows 10 the int values are cast into 32-bit integers for reasons given here
https://stackoverflow.com/questions/36278590/numpy-array-dtype-is-coming-as-int32-by-default-in-a-windows-10-64-bit-machine
This leads to unhandled exceptions when handling values beyond 32-bit signed range
In Bigquery, int is always 64bit, so the solution is to specify the data type explicitly

On 64-bit windows 10 the `int` values are cast into 32-bit integers for reasons given here
https://stackoverflow.com/questions/36278590/numpy-array-dtype-is-coming-as-int32-by-default-in-a-windows-10-64-bit-machine
This leads to unhanded exceptions when handling values beyond 32-bit signed range
In Bigquery, int is always 64bit, so the solution is to specify the data type explicitly
@codecov-io
Copy link

codecov-io commented Feb 15, 2018

Codecov Report

Merging #121 into master will decrease coverage by 44.71%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #121       +/-   ##
===========================================
- Coverage    75.7%   30.99%   -44.72%     
===========================================
  Files           8        8               
  Lines        1626     1626               
===========================================
- Hits         1231      504      -727     
- Misses        395     1122      +727
Impacted Files Coverage Δ
pandas_gbq/gbq.py 20.56% <0%> (-55.8%) ⬇️
pandas_gbq/tests/test_gbq.py 26.88% <0%> (-56.76%) ⬇️
pandas_gbq/_load.py 62.5% <0%> (-35%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b1e1ac6...3f444d2. Read the comment docs.

@blose blose changed the title Explicitly use 64bit integers when converting from BQ types BUG: Explicitly use 64bit integers when converting from BQ types Feb 15, 2018
@max-sixty
Copy link
Contributor

I think that looks good! Thanks!

I don't think there's a helpful test we could add, given we don't test on Windows - @tswast ?

Copy link
Collaborator

@tswast tswast left a comment

Choose a reason for hiding this comment

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

LGTM.

I've filed #122 for running Windows tests.

@tswast tswast merged commit 99cd849 into googleapis:master Feb 15, 2018
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.

4 participants