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

FilterBox,BigNumber,WorldMap: Handle empty results #9671

Merged
merged 1 commit into from
May 4, 2020

Conversation

elukey
Copy link
Contributor

@elukey elukey commented Apr 28, 2020

This change avoids Pandas errors to pop up in chart when no data
is returned (confusing users). In this way a nicer "No Results etc.." is returned.

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

Add some checks to avoid Pandas errors to bubble up to the users.

TEST PLAN

Using "legacy" Druid datasources and setting charts to return no data.
Before the fix:
Screen Shot 2020-05-04 at 12 50 59 PM
Screen Shot 2020-05-04 at 12 50 46 PM

After:
Screen Shot 2020-05-04 at 12 47 39 PM

ADDITIONAL INFORMATION

None

REVIEWERS

This change avoids Pandas errors to pop up in chart when no data
is returned (confusing users). In this way a nicer
"No Results etc.." is returned.
@codecov-io
Copy link

codecov-io commented Apr 28, 2020

Codecov Report

Merging #9671 into master will decrease coverage by 0.00%.
The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9671      +/-   ##
==========================================
- Coverage   70.53%   70.53%   -0.01%     
==========================================
  Files         581      581              
  Lines       30224    30230       +6     
  Branches     3078     3078              
==========================================
+ Hits        21319    21322       +3     
- Misses       8793     8796       +3     
  Partials      112      112              
Flag Coverage Δ
#cypress 53.65% <ø> (-0.01%) ⬇️
#javascript 58.75% <ø> (ø)
#python 70.61% <57.14%> (-0.01%) ⬇️
Impacted Files Coverage Δ
superset/viz.py 71.42% <57.14%> (-0.08%) ⬇️
...set-frontend/src/dashboard/util/getDropPosition.js 92.06% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c474ea8...5950bbf. Read the comment docs.

@elukey
Copy link
Contributor Author

elukey commented Apr 30, 2020

@mistercrunch if you have time for a quick review I'd be super grateful :)

@etr2460
Copy link
Member

etr2460 commented May 2, 2020

Could you show the old + new screenshots side by side in the test plan? thanks!

@elukey
Copy link
Contributor Author

elukey commented May 4, 2020

Could you show the old + new screenshots side by side in the test plan? thanks!

Added, hope it is what you asked, otherwise let me know!

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @elukey !

Copy link
Member

@etr2460 etr2460 left a comment

Choose a reason for hiding this comment

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

Perfect, thanks for the fix!

@etr2460 etr2460 merged commit 865a909 into apache:master May 4, 2020
etr2460 pushed a commit that referenced this pull request May 6, 2020
graceguo-supercat pushed a commit to airbnb/superset-fork that referenced this pull request May 6, 2020
elukey added a commit to elukey/incubator-superset that referenced this pull request May 12, 2020
This change was originally attempted in apache#9671 but reverted
since it broke FilterBox charts with only a time selector.

After some tests I reworked the patch to avoid returning None,
but instead returning an empty list for each col/selector with
an empty dataframe associated. This allows to see all the selectors
without any breakage.
bkyryliuk pushed a commit to bkyryliuk/incubator-superset that referenced this pull request May 13, 2020
etr2460 pushed a commit that referenced this pull request May 17, 2020
…9789)

* FilteBox: handle empty results (second attempt)

This change was originally attempted in #9671 but reverted
since it broke FilterBox charts with only a time selector.

After some tests I reworked the patch to avoid returning None,
but instead returning an empty list for each col/selector with
an empty dataframe associated. This allows to see all the selectors
without any breakage.

* BigNumberViz: avoid user facing errors when the dataframe is empty

* WorldMapViz: avoid user facing errors when the dataframe is empty
wmfgerrit pushed a commit to wikimedia/analytics-superset-deploy that referenced this pull request May 22, 2020
The version built is not the one that comes straight from Pypi,
but I have backported apache/superset#9468
and apache/superset#9671.
The bugs are minor ones, in fact it didn't stop the release process
when reported, so even using the version from pypi leads to a workable
result (just less nice to see in certain corner cases).

Bug: T249495
Change-Id: I671ac04fb52c3dc1241f686f37caa21ce097090a
wmfgerrit pushed a commit to wikimedia/analytics-superset-deploy that referenced this pull request May 27, 2020
The version built is not the one that comes straight from Pypi,
but I have backported apache/superset#9468
and apache/superset#9671.
The bugs are minor ones, in fact it didn't stop the release process
when reported, so even using the version from pypi leads to a workable
result (just less nice to see in certain corner cases).

Bug: T249495
Change-Id: I8084a0f38c6c458bbaac8c03d158a062e830a678
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.37.0 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/S 🚢 0.37.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants