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

No exception on no data #5597

Merged
merged 2 commits into from
Aug 14, 2018
Merged

No exception on no data #5597

merged 2 commits into from
Aug 14, 2018

Conversation

betodealmeida
Copy link
Member

When trying to replicate a bug I found out to the backend is raising exceptions when no data is returned, both in Druid (explicitly) and in SQLAlchemy (iterating over a cursor.description that is None).

I think the SQLAlchemy bug happens only in conjunction with the druid backend, and I recently fixed it (druid-io/pydruid#133). But it's better to be on the safe side here.

@codecov-io
Copy link

Codecov Report

Merging #5597 into master will increase coverage by <.01%.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5597      +/-   ##
=========================================
+ Coverage    63.6%   63.6%   +<.01%     
=========================================
  Files         359     359              
  Lines       22786   22789       +3     
  Branches     2532    2532              
=========================================
+ Hits        14492   14494       +2     
- Misses       8279    8280       +1     
  Partials       15      15
Impacted Files Coverage Δ
superset/viz.py 81.16% <ø> (-0.02%) ⬇️
superset/connectors/druid/models.py 82.56% <50%> (+0.02%) ⬆️
superset/models/core.py 85.07% <66.66%> (-0.1%) ⬇️

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 a8f4849...86f1fc1. Read the comment docs.

@hughhhh
Copy link
Member

hughhhh commented Aug 10, 2018

What will transpire in the UI for a No Data? Right now GeoVis actually uses that exception (400 status code) for indicating there isn't data available.

https://github.com/apache/incubator-superset/blob/master/superset/exceptions.py#L25

@betodealmeida
Copy link
Member Author

@hughhhh, the UI will now show the yellow bar with the text "No Data". The exception is raised later in viz.py, when it detects that the dataframe is empty.

@hughhhh
Copy link
Member

hughhhh commented Aug 11, 2018

🚢

@mistercrunch
Copy link
Member

LGTM

@mistercrunch mistercrunch merged commit 763eeca into apache:master Aug 14, 2018
@mistercrunch mistercrunch deleted the DATA-6622 branch August 14, 2018 05:33
betodealmeida added a commit to lyft/incubator-superset that referenced this pull request Aug 21, 2018
* No exception on no data

* Remove unreachable exception

(cherry picked from commit 763eeca)
betodealmeida added a commit to lyft/incubator-superset that referenced this pull request Aug 22, 2018
* No exception on no data

* Remove unreachable exception

(cherry picked from commit 763eeca)
betodealmeida added a commit to lyft/incubator-superset that referenced this pull request Aug 22, 2018
* No exception on no data

* Remove unreachable exception

(cherry picked from commit 763eeca)
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* No exception on no data

* Remove unreachable exception
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.28.0 labels Feb 27, 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 🚢 0.28.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants