LuisSanchez commented on code in PR #37260:
URL: https://github.com/apache/superset/pull/37260#discussion_r2783785018


##########
superset/common/query_context_processor.py:
##########
@@ -98,6 +98,18 @@ def get_df_payload(
             force_cached=force_cached,
         )
 
+        # If cache is loaded but missing applied_filter_columns and query has 
filters,
+        # treat as cache miss to ensure fresh query with proper 
applied_filter_columns
+        if (
+            query_obj
+            and cache_key
+            and cache.is_loaded
+            and not cache.applied_filter_columns
+            and query_obj.filter
+            and len(query_obj.filter) > 0
+        ):
+            cache.is_loaded = False
+

Review Comment:
   Indeed it solves the problem of not having the `applied_filter_columns`, 
maybe I was being too careful, but didn't want to bypass any condition, only 
with `not cache.applied_filter_columns` should work.
   
   Related to:
   > Can we make sure applied_filter_columns are never missing when they should 
exist?
   
   Yes, I made sure that if `appliedColumns` does not exist on the frontend, 
created a callback to the backend with the new `getAppliedColumnsWithFallback` 
function.
   
   The other 2 minor fixes on this PR are related to how the `clear all` was 
reseting the values, specially with range number (which happened on my test 
case) and the `ensureIsArray`, I talked about this bug on the other thread, for 
some cases it was returning `", "`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to