Skip to content

Add check for calls to cache_key_wrapper - #8128

Merged
graceguo-supercat merged 4 commits into
apache:masterfrom
villebro:cache_key_wrapper
Aug 27, 2019
Merged

graceguo-supercat merged 4 commits into
apache:masterfrom
villebro:cache_key_wrapper

Conversation

@villebro

Copy link
Copy Markdown
Member

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

This PR adds a check to see if any component of query_obj contains calls to cache_key_wrapper(). If not, the query is not compiled if it is already cached.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

CI

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

REVIEWERS

@etr2460

@etr2460 etr2460 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

a couple comments, but lgtm otherwise. Thanks for the quick fix!

Comment thread superset/connectors/sqla/models.py Resolved
Comment thread superset/connectors/sqla/models.py Resolved
@graceguo-supercat
graceguo-supercat merged commit 1982b74 into apache:master Aug 27, 2019
@villebro
villebro deleted the cache_key_wrapper branch August 28, 2019 03:51
@villebro villebro added the v0.34 label Aug 31, 2019
@mistercrunch mistercrunch added 🍒 0.34.1 Cherry-picked to 0.34.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.35.0 First shipped in 0.35.0 labels Feb 28, 2024
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
* Add check for calls to cache_key_wrapper to avoid unavoidable compilation of query

* Add fetch_values_predicate to check

* Only check relevant attributes

* Address nit
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
* Add check for calls to cache_key_wrapper to avoid unavoidable compilation of query

* Add fetch_values_predicate to check

* Only check relevant attributes

* Address nit
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 v0.34 🍒 0.34.1 Cherry-picked to 0.34.1 🚢 0.35.0 First shipped in 0.35.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants