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: allow adhoc columns in non-aggregate query #21729

Merged
merged 11 commits into from
Oct 10, 2022

Conversation

mayurnewase
Copy link
Contributor

@mayurnewase mayurnewase commented Oct 7, 2022

SUMMARY

fixes: #21689
regression from : #19454

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • 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

@mayurnewase mayurnewase marked this pull request as ready for review October 7, 2022 04:36
@codecov
Copy link

codecov bot commented Oct 7, 2022

Codecov Report

Merging #21729 (4a6eaa8) into master (97273f5) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #21729      +/-   ##
==========================================
+ Coverage   66.85%   66.86%   +0.01%     
==========================================
  Files        1799     1799              
  Lines       68887    68906      +19     
  Branches     7320     7320              
==========================================
+ Hits        46052    46072      +20     
+ Misses      20946    20945       -1     
  Partials     1889     1889              
Flag Coverage Δ
hive 52.93% <100.00%> (+0.01%) ⬆️
mysql 78.25% <100.00%> (+<0.01%) ⬆️
postgres 78.31% <100.00%> (+<0.01%) ⬆️
presto 52.83% <100.00%> (+0.01%) ⬆️
python 81.46% <100.00%> (+0.01%) ⬆️
sqlite 76.80% <100.00%> (-0.01%) ⬇️
unit 51.05% <77.77%> (+0.09%) ⬆️

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

Impacted Files Coverage Δ
superset/connectors/sqla/models.py 90.73% <100.00%> (+0.04%) ⬆️
superset/superset_typing.py 98.18% <100.00%> (ø)
superset/utils/core.py 90.32% <100.00%> (ø)
superset/db_engine_specs/gsheets.py 75.91% <0.00%> (-0.21%) ⬇️
superset/queries/saved_queries/api.py 95.28% <0.00%> (ø)
superset/databases/schemas.py 98.23% <0.00%> (+<0.01%) ⬆️
superset/config.py 91.63% <0.00%> (+0.02%) ⬆️
superset/models/sql_lab.py 74.80% <0.00%> (+0.09%) ⬆️
superset/datasets/api.py 87.39% <0.00%> (+0.10%) ⬆️
superset/db_engine_specs/__init__.py 85.71% <0.00%> (+0.90%) ⬆️
... and 1 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

leave a comment for code convention.

superset/connectors/sqla/models.py Outdated Show resolved Hide resolved
superset/connectors/sqla/models.py Outdated Show resolved Hide resolved
@mayurnewase
Copy link
Contributor Author

thanks for review, will update today.

@pull-request-size pull-request-size bot added size/M and removed size/L labels Oct 8, 2022
superset/connectors/sqla/models.py Outdated Show resolved Hide resolved
superset/connectors/sqla/models.py Outdated Show resolved Hide resolved
superset/connectors/sqla/models.py Outdated Show resolved Hide resolved
@zhaoyongjie
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@zhaoyongjie Ephemeral environment spinning up at http://54.188.110.15:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

work as expected.

image

@mayurnewase
Copy link
Contributor Author

thanks for review and testing ...

@zhaoyongjie zhaoyongjie changed the title fix: allow adhoc query in chart columns fix: allow adhoc columns in non-aggregate query Oct 10, 2022
@zhaoyongjie zhaoyongjie merged commit d1a6f0e into apache:master Oct 10, 2022
@@ -119,6 +119,7 @@
from superset.superset_typing import (
AdhocColumn,
AdhocMetric,
Column as ColumnTyping,
Copy link
Member

Choose a reason for hiding this comment

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

@mayurnewase out of interest why did you rename this? There doesn't seem to be a name clash per your change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@john-bodley there is import of Column from sqlalchemy on line 50.

@mayurnewase
Copy link
Contributor Author

I think this PR also needs to go in v1.5 as ville tagged corresponding issue for 1.5.
I don't know who is the release manager here, so maybe ping @michael-s-molina

@mayurnewase mayurnewase deleted the fix-21689 branch November 8, 2022 17:14
@michael-s-molina
Copy link
Member

I think this PR also needs to go in v1.5 as ville tagged corresponding issue for 1.5. I don't know who is the release manager here, so maybe ping @michael-s-molina

I added the v1.5 label. Let's see if it merges cleanly.

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/M v1.5 v2.0 v2.0.1 🍒 1.5.3 🍒 2.0.1 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Chart] Can't use custom SQL in chart since 2.0.0 upgrade
6 participants