Skip to content

Handling NULL values in Filters#825

Closed
kkalyan wants to merge 12 commits into
apache:masterfrom
kkalyan:nullcheck
Closed

Handling NULL values in Filters#825
kkalyan wants to merge 12 commits into
apache:masterfrom
kkalyan:nullcheck

Conversation

@kkalyan

@kkalyan kkalyan commented Jul 27, 2016

Copy link
Copy Markdown
Contributor

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

coveralls commented Jul 27, 2016

Copy link
Copy Markdown

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

coveralls commented Jul 27, 2016

Copy link
Copy Markdown

Coverage Status

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

@coveralls

Copy link
Copy Markdown

Coverage Status

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

Comment thread caravel/viz.py
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
Copy Markdown
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?

@kkalyan kkalyan Jul 29, 2016

Copy link
Copy Markdown
Contributor Author

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

coveralls commented Jul 29, 2016

Copy link
Copy Markdown

Coverage Status

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

@coveralls

coveralls commented Jul 31, 2016

Copy link
Copy Markdown

Coverage Status

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

@coveralls

coveralls commented Aug 2, 2016

Copy link
Copy Markdown

Coverage Status

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

@coveralls

coveralls commented Aug 4, 2016

Copy link
Copy Markdown

Coverage Status

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

@coveralls

coveralls commented Aug 8, 2016

Copy link
Copy Markdown

Coverage Status

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

@kkalyan

kkalyan commented Aug 9, 2016

Copy link
Copy Markdown
Contributor Author

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

@coveralls

coveralls commented Aug 9, 2016

Copy link
Copy Markdown

Coverage Status

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

@coveralls

coveralls commented Aug 9, 2016

Copy link
Copy Markdown

Coverage Status

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

@coveralls

coveralls commented Aug 11, 2016

Copy link
Copy Markdown

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.

3 participants