-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dealing with null values in decimal column types
- Loading branch information
Boaz Shalom
committed
Aug 20, 2019
1 parent
6bf07c3
commit e626d40
Showing
1 changed file
with
3 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e626d40
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.
@boazsha can you please explain the logic behind the change? decimals should fall trough to line 77 in original code (e626d40#diff-81b09c4ad099e18e6810ef8bac645cf2L77)
e626d40
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.
@danield137 Does this help: #157? 😄
e626d40
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.
@justinclift that is the reason for the change, I am trying to understand the logic here.
_hidden_values
are used for our support of high precision types for pandas.So the entire if/else block is just about how to pick what we store for later use in pandas (should probably clean code up a bit here)
Anyway, I think I understand the fix, but it is done in a way that is much harder to read, I would rather a proper one.
The appropriate fix would be to handle non null-able types that are returned as null separately, either by a proper conversion function or by a separate if block.