This is an automated email from the ASF dual-hosted git repository.

johnbodley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new bd8951e958 fix: Optimize fetching samples logic (#26060)
bd8951e958 is described below

commit bd8951e9586fb3bb36c13f394bc257bda1a851e3
Author: John Bodley <[email protected]>
AuthorDate: Tue Nov 21 13:26:02 2023 -0800

    fix: Optimize fetching samples logic (#26060)
---
 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 9baabdcc54..afed5f7fd2 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,too-many-locals
         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

Reply via email to