You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2023/12/04 17:09:31 UTC
(superset) 04/16: fix: Optimize fetching samples logic (#26060)
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 79167785852af0022ea4c4ac6a60288f379be4fb
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Tue Nov 21 13:26:02 2023 -0800
fix: Optimize fetching samples logic (#26060)
(cherry picked from commit bd8951e9586fb3bb36c13f394bc257bda1a851e3)
---
superset/views/datasource/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset/views/datasource/utils.py b/superset/views/datasource/utils.py
index e529427898..cb58d3aad9 100644
--- a/superset/views/datasource/utils.py
+++ b/superset/views/datasource/utils.py
@@ -114,7 +114,7 @@ def get_samples( # pylint: disable=too-many-arguments
sample_data = samples_instance.get_payload()["queries"][0]
if sample_data.get("status") == QueryStatus.FAILED:
- QueryCacheManager.delete(sample_data.get("cache_key"), CacheRegion.DATA)
+ QueryCacheManager.delete(count_star_data.get("cache_key"), CacheRegion.DATA)
raise DatasetSamplesFailedError(sample_data.get("error"))
sample_data["page"] = page