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

fix: raise unexpected error when orderby is empty #15353

Merged
merged 2 commits into from Jun 30, 2021

Conversation

zhaoyongjie
Copy link
Member

@zhaoyongjie zhaoyongjie commented Jun 24, 2021

SUMMARY

currently, Superset raises python unexpected error when orderby missing column.

This PR catch this exception by Marshmallow, I will fix this issue in superset-ui repo

How to reproduce this issue

  1. open mixed timeseries chart
  2. populate a column to sort by
  3. click query button
  4. remove existing column from sort by control
  5. click query button
  6. raise unhashable type error

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before

image

after

image

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Jun 24, 2021

Codecov Report

Merging #15353 (b73e9e4) into master (352656a) will decrease coverage by 0.14%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15353      +/-   ##
==========================================
- Coverage   77.16%   77.01%   -0.15%     
==========================================
  Files         973      973              
  Lines       50523    50526       +3     
  Branches     6184     6184              
==========================================
- Hits        38986    38913      -73     
- Misses      11331    11407      +76     
  Partials      206      206              
Flag Coverage Δ
hive ?
mysql 81.71% <ø> (+<0.01%) ⬆️
postgres 81.73% <ø> (+<0.01%) ⬆️
python 81.81% <ø> (-0.29%) ⬇️
sqlite 81.36% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/charts/schemas.py 100.00% <ø> (ø)
superset/db_engines/hive.py 0.00% <0.00%> (-82.15%) ⬇️
superset/db_engine_specs/hive.py 69.20% <0.00%> (-17.21%) ⬇️
superset/views/database/mixins.py 81.03% <0.00%> (-1.73%) ⬇️
superset/db_engine_specs/presto.py 83.36% <0.00%> (-1.06%) ⬇️
superset/db_engine_specs/base.py 87.97% <0.00%> (-0.41%) ⬇️
superset/connectors/sqla/models.py 88.22% <0.00%> (-0.24%) ⬇️
superset/utils/core.py 88.97% <0.00%> (-0.09%) ⬇️
superset/viz.py 56.52% <0.00%> (+0.05%) ⬆️

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 352656a...b73e9e4. Read the comment docs.

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.

LGTM

@zhaoyongjie zhaoyongjie merged commit 292bce5 into apache:master Jun 30, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
* fix: raise unexpected error when orderby is empty

* fix ut
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* fix: raise unexpected error when orderby is empty

* fix ut
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
* fix: raise unexpected error when orderby is empty

* fix ut
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 12, 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 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants