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: add back custom sql filtering with Query as source #21190

Merged
merged 7 commits into from
Aug 27, 2022
Merged

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented Aug 24, 2022

SUMMARY

Re-enabling template processing for Query object inside ExploreMixin class. This was missed in the initial implementation, but discovered in the last release. This PR also fixes issues with saving adhoc custom sql when using a Query to be saved when creating a SqlaTable

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

@codecov
Copy link

codecov bot commented Aug 24, 2022

Codecov Report

Merging #21190 (a536133) into master (68fa4d2) will decrease coverage by 0.15%.
The diff coverage is 25.00%.

❗ Current head a536133 differs from pull request most recent head 4067dc4. Consider uploading reports for the commit 4067dc4 to get more accurate results

@@            Coverage Diff             @@
##           master   #21190      +/-   ##
==========================================
- Coverage   66.36%   66.21%   -0.16%     
==========================================
  Files        1781     1781              
  Lines       67930    67909      -21     
  Branches     7255     7246       -9     
==========================================
- Hits        45085    44969     -116     
- Misses      20982    21078      +96     
+ Partials     1863     1862       -1     
Flag Coverage Δ
hive ?
mysql 80.98% <25.00%> (-0.02%) ⬇️
postgres 81.03% <25.00%> (-0.02%) ⬇️
presto ?
python 81.14% <25.00%> (-0.38%) ⬇️
sqlite 79.63% <25.00%> (-0.02%) ⬇️
unit ?

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

Impacted Files Coverage Δ
...lUtils/getControlValuesCompatibleWithDatasource.ts 8.00% <ø> (ø)
superset/config.py 91.58% <ø> (ø)
superset/db_engine_specs/trino.py 74.76% <0.00%> (ø)
superset/models/helpers.py 39.21% <12.50%> (-0.11%) ⬇️
superset/models/sql_lab.py 74.90% <66.66%> (-2.12%) ⬇️
superset/db_engines/hive.py 0.00% <0.00%> (-85.19%) ⬇️
superset/db_engine_specs/hive.py 71.04% <0.00%> (-15.84%) ⬇️
superset/db_engine_specs/presto.py 81.36% <0.00%> (-6.62%) ⬇️
superset/initialization/__init__.py 89.96% <0.00%> (-1.74%) ⬇️
... and 18 more

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

@yousoph
Copy link
Member

yousoph commented Aug 24, 2022

/testenv up

@github-actions
Copy link
Contributor

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

@yousoph
Copy link
Member

yousoph commented Aug 25, 2022

/testenv up FEATURE_GENERIC_CHART_AXES = True

@github-actions
Copy link
Contributor

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

@pull-request-size pull-request-size bot added size/M and removed size/S labels Aug 25, 2022
@hughhhh hughhhh changed the title fix: custom sql filtering with Query as source fix: add back custom sql filtering with Query as source Aug 25, 2022
@yousoph
Copy link
Member

yousoph commented Aug 25, 2022

/testenv up FEATURE_GENERIC_CHART_AXES=true

@github-actions
Copy link
Contributor

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

@jinghua-qa
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@jinghua-qa Ephemeral environment spinning up at http://35.85.63.79:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@jinghua-qa
Copy link
Member

I found an issue that if user set a filter use custom-sql filter, after save the chart, the custom sql fiter will be removed.

Screen.Recording.2022-08-25.at.12.31.12.AM.mov

@github-actions
Copy link
Contributor

Storybook has completed and can be viewed at

JsonValue,
SimpleAdhocFilter,
FreeFormAdhocFilter,
Copy link
Member

Choose a reason for hiding this comment

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

do you still need this import for FreeFormAdhocFilter?

Copy link
Member Author

Choose a reason for hiding this comment

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

nope removed it

@github-actions
Copy link
Contributor

Storybook has completed and can be viewed at

1 similar comment
@github-actions
Copy link
Contributor

Storybook has completed and can be viewed at

@hughhhh hughhhh requested a review from rusackas August 26, 2022 18:37
@hughhhh
Copy link
Member Author

hughhhh commented Aug 26, 2022

/testenv up

@github-actions
Copy link
Contributor

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

@jinghua-qa
Copy link
Member

/testenv up FEATURE_GENERIC_CHART_AXES=true

@github-actions
Copy link
Contributor

@jinghua-qa Ephemeral environment spinning up at http://35.86.96.160:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

Copy link
Member

@jinghua-qa jinghua-qa left a comment

Choose a reason for hiding this comment

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

LGTM

@hughhhh hughhhh merged commit c61a507 into master Aug 27, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
@mistercrunch mistercrunch deleted the fix-sql-tp branch March 26, 2024 16:12
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 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants