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

Comments

Projects
2 participants
@tsdlovell

tsdlovell commented Mar 20, 2018

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

This comment has been minimized.

Member

cpcloud commented Apr 11, 2018

Seems reasonable.

@cpcloud cpcloud added this to the 0.14 milestone Apr 11, 2018

@cpcloud cpcloud self-assigned this Apr 11, 2018

@cpcloud cpcloud added this to To do in BigQuery via automation Apr 11, 2018

@cpcloud cpcloud changed the title from bigquery backend should default `/` to `IEEE_DIVIDE` to ENH: BigQuery backend should default `/` to `IEEE_DIVIDE` Apr 11, 2018

@cpcloud cpcloud closed this in 8192e6f Apr 11, 2018

BigQuery automation moved this from To do to Done Apr 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment