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

ENH: BigQuery backend should default / to IEEE_DIVIDE #1390

Closed
tsdlovell opened this issue Mar 20, 2018 · 1 comment
Closed

ENH: BigQuery backend should default / to IEEE_DIVIDE #1390

tsdlovell opened this issue Mar 20, 2018 · 1 comment
Assignees
Labels
feature Features or general enhancements
Milestone

Comments

@tsdlovell
Copy link

else you can get a failure regarding divide by zero in the middle of your query execution

https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#special-cases-for-ieee_dividex-y

In [1]: import ibis

In [2]: client = ibis.bigquery.connect('project_id', 'dataset_id')

In [3]: client.raw_sql('select 1 / 0')
---------------------------------------------------------------------------
BadRequest                                Traceback (most recent call last)
<ipython-input-3-1e33b273ef6c> in <module>()
----> 1 client.raw_sql('select 1 / 0')
...
BadRequest: 400 POST https://www.googleapis.com/bigquery/v2/projects/project_id/queries: division by zero

In [4]: client.raw_sql('select IEEE_DIVIDE(1, 0)').fetchall()
Out[4]: [(inf,)]
@cpcloud
Copy link
Member

cpcloud commented Apr 11, 2018

Seems reasonable.

@cpcloud cpcloud added this to the 0.14 milestone Apr 11, 2018
@cpcloud cpcloud added feature Features or general enhancements bigquery labels Apr 11, 2018
@cpcloud cpcloud self-assigned this Apr 11, 2018
@cpcloud cpcloud changed the title bigquery backend should default / to IEEE_DIVIDE ENH: BigQuery backend should default / to IEEE_DIVIDE Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Features or general enhancements
Projects
None yet
Development

No branches or pull requests

2 participants