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

Handling NULL values in Filters #825

Closed
wants to merge 12 commits into from
Closed

Handling NULL values in Filters #825

wants to merge 12 commits into from

Conversation

kkalyan
Copy link
Contributor

@kkalyan kkalyan commented Jul 27, 2016

As of now, we can not add Filter to express that value of dimension is NULL.
Adding null in filterbox is considered for searching for literal string 'NULL'.
Addresses Issue: #663

Also displaying NULL values as NULL (instead of 0) as per @x4base suggestion.

@coveralls
Copy link

coveralls commented Jul 27, 2016

Coverage Status

Coverage decreased (-0.05%) to 80.963% when pulling 504e44e on kkalyan:nullcheck into f43e5f1 on airbnb:master.

@kkalyan kkalyan changed the title Adding ability to Filter for null values Handling NULL values in Filters Jul 27, 2016
@coveralls
Copy link

coveralls commented Jul 27, 2016

Coverage Status

Coverage decreased (-0.05%) to 80.963% when pulling 136139a on kkalyan:nullcheck into f43e5f1 on airbnb:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.08%) to 80.932% when pulling 136139a on kkalyan:nullcheck into f43e5f1 on airbnb:master.

@@ -177,7 +177,7 @@ def get_df(self, query_obj=None):
if self.datasource.offset:
df.timestamp += timedelta(hours=self.datasource.offset)
df.replace([np.inf, -np.inf], np.nan)
df = df.fillna(0)
df = df.fillna('NULL')
Copy link
Member

Choose a reason for hiding this comment

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

It seems like this main create some problems where there's missing data expected to be numeric. Ultimately we want javascript's reserved null in the json. Would df.fillna(None) work?

Copy link
Contributor Author

@kkalyan kkalyan Jul 29, 2016

Choose a reason for hiding this comment

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

df.fillna(None) threw an error 'must specify a fill method or value'
But I get your point - if ('NULL') is treated as true in javascript. we may need some similar handling in javascript (like value=='NULL'?value:null).

Side note - should this fillna be done only for Dimensions and skip Metrics ?

@coveralls
Copy link

coveralls commented Jul 29, 2016

Coverage Status

Coverage decreased (-0.05%) to 80.974% when pulling a8a91ec on kkalyan:nullcheck into 299e31f on airbnb:master.

@coveralls
Copy link

coveralls commented Jul 31, 2016

Coverage Status

Coverage decreased (-0.05%) to 81.096% when pulling 72b619a on kkalyan:nullcheck into ee9141a on airbnb:master.

@coveralls
Copy link

coveralls commented Aug 2, 2016

Coverage Status

Coverage decreased (-0.05%) to 81.445% when pulling 0702dcd on kkalyan:nullcheck into aaef338 on airbnb:master.

@coveralls
Copy link

coveralls commented Aug 4, 2016

Coverage Status

Coverage decreased (-0.05%) to 81.445% when pulling 7462f65 on kkalyan:nullcheck into 82a8e63 on airbnb:master.

@coveralls
Copy link

coveralls commented Aug 8, 2016

Coverage Status

Coverage decreased (-0.05%) to 81.426% when pulling 9deb84b on kkalyan:nullcheck into b0a1f07 on airbnb:master.

@kkalyan
Copy link
Contributor Author

kkalyan commented Aug 9, 2016

@mistercrunch I've been testing lot of visualizations with this fix, no issues are found.

@coveralls
Copy link

coveralls commented Aug 9, 2016

Coverage Status

Coverage decreased (-0.1%) to 81.377% when pulling 0ab4104 on kkalyan:nullcheck into 572c6ee on airbnb:master.

@coveralls
Copy link

coveralls commented Aug 9, 2016

Coverage Status

Coverage decreased (-0.1%) to 81.377% when pulling 0ab4104 on kkalyan:nullcheck into 572c6ee on airbnb:master.

@coveralls
Copy link

coveralls commented Aug 11, 2016

Coverage Status

Coverage decreased (-0.1%) to 80.906% when pulling 1f7de43 on kkalyan:nullcheck into efdfa81 on airbnb:master.

zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 17, 2021
After recent changes to chart controls in Superset, some typing has become obsolete. Let's clean it up.
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 24, 2021
After recent changes to chart controls in Superset, some typing has become obsolete. Let's clean it up.
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 25, 2021
After recent changes to chart controls in Superset, some typing has become obsolete. Let's clean it up.
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 26, 2021
After recent changes to chart controls in Superset, some typing has become obsolete. Let's clean it up.
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.

None yet

3 participants