villebro commented on a change in pull request #14291:
URL: https://github.com/apache/superset/pull/14291#discussion_r619387984



##########
File path: superset/utils/core.py
##########
@@ -1065,6 +1065,9 @@ def to_adhoc(
     elif expression_type == "SQL":
         result.update({"sqlExpression": filt.get(clause)})
 
+    deterministic_name = md5_sha_from_dict(result)
+    result["filterOptionName"] = deterministic_name

Review comment:
       With a deterministic `filterOptionName` we of course now have the risk 
of having duplicate `filterOptionNames` which probably is precisely what the 
uuid4 key is aiming to avoid (could cause trouble in React components if these 
get returned to the frontend). So maybe we should deduplicate filters, too, 
which in edge cases would avoid unnecessary cache misses (=if the exact same 
filter has been defined twice vs another query where the same filter is only 
defined once)?




-- 
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.

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