fix: cache key generation (#36225)

This commit is contained in:
Beto Dealmeida
2025-11-25 12:50:00 -05:00
committed by GitHub
parent 8d5d71199a
commit 0c87034b17
7 changed files with 391 additions and 12 deletions

View File

@@ -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:
"""