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

Revert "Fixed Histogram visualization bug. " #8145

Merged
merged 1 commit into from
Aug 30, 2019

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented Aug 30, 2019

Reverts #8077

This change introduced a new bug for many more histograms:

Traceback (most recent call last):
  File "/Users/erik_ritter/repos/github.com/incubator-superset/superset/viz.py", line 415, in get_df_payload
    df = self.get_df(query_obj)
  File "/Users/erik_ritter/repos/github.com/incubator-superset/superset/viz.py", line 200, in get_df
    self.results = self.datasource.query(query_obj)
  File "/Users/erik_ritter/repos/github.com/incubator-superset/superset/connectors/sqla/models.py", line 913, in query
    query_str_ext = self.get_query_str_extended(query_obj)
  File "/Users/erik_ritter/repos/github.com/incubator-superset/superset/connectors/sqla/models.py", line 545, in get_query_str_extended
    sqlaq = self.get_sqla_query(**query_obj)
  File "/Users/erik_ritter/repos/github.com/incubator-superset/superset/connectors/sqla/models.py", line 691, in get_sqla_query
    if s in cols
TypeError: unhashable type: 'list'

Tested:
http://localhost:5000/superset/explore/?form_data=%7B%22datasource%22%3A%223__table%22%2C%22viz_type%22%3A%22histogram%22%2C%22url_params%22%3A%7B%7D%2C%22granularity_sqla%22%3A%22ds%22%2C%22time_grain_sqla%22%3A%22P1D%22%2C%22time_range%22%3A%22No+filter%22%2C%22all_columns_x%22%3A%5B%22sum_boys%22%5D%2C%22adhoc_filters%22%3A%5B%5D%2C%22row_limit%22%3A10000%2C%22groupby%22%3A%5B%22name%22%5D%2C%22color_scheme%22%3A%22bnbColors%22%2C%22label_colors%22%3A%7B%7D%2C%22link_length%22%3A5%2C%22x_axis_label%22%3A%22%22%2C%22y_axis_label%22%3A%22%22%2C%22global_opacity%22%3A1%2C%22normalized%22%3Afalse%7D

This histogram loads with the revert, but throws the error before the revert.

@graceguo-supercat @serenajiang @villebro @kuckjwi0928

Copy link

@graceguo-supercat graceguo-supercat left a comment

Choose a reason for hiding this comment

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

LGTM

@villebro
Copy link
Member

Hmm, it seems #8077 addressed a bug in "@superset-ui/legacy-plugin-chart-histogram": "^0.10.11" that was fixed by #8115 which bumped to "@superset-ui/legacy-plugin-chart-histogram": "^0.11.0". Badly timed bugfix for a bug in a dependency?

@etr2460
Copy link
Member Author

etr2460 commented Aug 30, 2019

Perhaps. I think reverting this is the right call though as it unbreaks master

@etr2460
Copy link
Member Author

etr2460 commented Aug 30, 2019

Actually, I don't think #8115 fixed the bug, but instead just updated some of the API around superset-ui/chart. We probably should reopen the issue and figure out a more permanent bug fix

@villebro
Copy link
Member

IIRC, prior to merging I checked that all_columns_x behaved similarly in other viz's, so the change in API might have wider implications. Should prob also double check that the others are still working.

@codecov-io
Copy link

Codecov Report

Merging #8145 into master will decrease coverage by 7.57%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8145      +/-   ##
==========================================
- Coverage   73.75%   66.18%   -7.58%     
==========================================
  Files         115      479     +364     
  Lines       12059    22944   +10885     
  Branches        0     2525    +2525     
==========================================
+ Hits         8894    15185    +6291     
- Misses       3165     7625    +4460     
- Partials        0      134     +134
Impacted Files Coverage Δ
superset/viz.py 71.27% <0%> (ø) ⬆️
superset/db_engine_specs/postgres.py 79.31% <0%> (-17.25%) ⬇️
superset/assets/src/components/Checkbox.jsx 100% <0%> (ø)
...ations/deckgl/layers/Polygon/PolygonChartPlugin.js 0% <0%> (ø)
.../assets/src/dashboard/reducers/dashboardFilters.js 88.23% <0%> (ø)
...ets/src/dashboard/components/dnd/DragDroppable.jsx 94.59% <0%> (ø)
...c/visualizations/deckgl/layers/Polygon/Polygon.jsx 0% <0%> (ø)
superset/assets/src/components/EditableTitle.jsx 81.81% <0%> (ø)
superset/assets/src/setup/setupPlugins.js 0% <0%> (ø)
...t/assets/src/components/InfoTooltipWithTrigger.jsx 41.66% <0%> (ø)
... and 356 more

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 7f17ba7...f9c8c50. Read the comment docs.

@graceguo-supercat graceguo-supercat merged commit 1b031fc into apache:master Aug 30, 2019
villebro pushed a commit that referenced this pull request Sep 8, 2019
@villebro villebro added the v0.34 label Sep 8, 2019
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants