-
Notifications
You must be signed in to change notification settings - Fork 590
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/BUG: Fix broken decimal type support #1541
Conversation
439ad27
to
cfcde6a
Compare
cfcde6a
to
b162072
Compare
| @@ -9,7 +9,7 @@ RUN apt-get -qq update -y \ | |||
| ARG PYTHON | |||
| ARG ENVKIND | |||
|
|
|||
| ADD ci/requirements-${ENVKIND}-${PYTHON}.yml / | |||
| COPY ci/requirements-${ENVKIND}-${PYTHON}.yml / | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| dtype = arg.type() | ||
| else: | ||
| dtype = dt.double | ||
| return rlz.shape_like(arg, dtype) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semantically this is equivalent with
dtype = dt.highest_precedence([self.arg.type(), dt.double])probably faster though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which reminds me, We might decorate dt.highest_precedence with functools.lru_cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes #1534 Depends on #1541 Author: Phillip Cloud <cpcloud@gmail.com> Closes #1535 from cpcloud/add-bq-numeric and squashes the following commits: 03e7706 [Phillip Cloud] Remove unused variable db5318e [Phillip Cloud] Cleanup dispatch 97675ea [Phillip Cloud] Add support for NUMERIC in the BigQuery backend 2 7012efe [Phillip Cloud] Add support for NUMERIC in the BigQuery backend 990d6fd [Phillip Cloud] Add datamgr numeric_table creation

There are a number of places where we are computing the incorrect
output_typefor some operations as well as computing afloat64output type for operations whose inputs are decimals. Impala explicitly does this and so does BigQuery. The upshot of this is that whenschema.apply_to(result)is called in these backends we will convert the data (which will befloat64Seriesobjects) intoDecimalcolumns.