mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +00:00
fix: cache key generation (#36225)
This commit is contained in:
@@ -392,6 +392,7 @@ class QueryObject: # pylint: disable=too-many-instance-attributes
|
||||
"metrics": self.metrics,
|
||||
"order_desc": self.order_desc,
|
||||
"orderby": self.orderby,
|
||||
"post_processing": self.post_processing,
|
||||
"row_limit": self.row_limit,
|
||||
"row_offset": self.row_offset,
|
||||
"series_columns": self.series_columns,
|
||||
@@ -487,7 +488,17 @@ class QueryObject: # pylint: disable=too-many-instance-attributes
|
||||
# datasource or database do not exist
|
||||
pass
|
||||
|
||||
return md5_sha_from_dict(cache_dict, default=json_int_dttm_ser, ignore_nan=True)
|
||||
cache_key = md5_sha_from_dict(
|
||||
cache_dict, default=json_int_dttm_ser, ignore_nan=True
|
||||
)
|
||||
# Log QueryObject cache key generation for debugging
|
||||
if logger.isEnabledFor(logging.DEBUG):
|
||||
logger.debug(
|
||||
"QueryObject CACHE KEY generated: %s from dict with keys: %s",
|
||||
cache_key,
|
||||
sorted(cache_dict.keys()),
|
||||
)
|
||||
return cache_key
|
||||
|
||||
def exec_post_processing(self, df: DataFrame) -> DataFrame:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user