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



##########
File path: tests/integration_tests/utils_tests.py
##########
@@ -85,19 +85,6 @@
 from .fixtures.certificates import ssl_certificate
 
 
-def mock_to_adhoc(filt, expressionType="SIMPLE", clause="where"):
-    result = {"clause": clause.upper(), "expressionType": expressionType}
-
-    if expressionType == "SIMPLE":
-        result.update(
-            {"comparator": filt["val"], "operator": filt["op"], "subject": 
filt["col"]}
-        )
-    elif expressionType == "SQL":
-        result.update({"sqlExpression": filt[clause]})
-
-    return result
-
-

Review comment:
       Having a mock like this felt unnecessary and dangerous, as it's mostly 
the same as the original function + the logic associated with conversion 
between regular and adhoc metrics is already brittle. Therefore this mock is 
removed and the assertions updated to reflect what is actually expected to be 
returned when running the full chain of `convert_legacy_filters_into_adhoc`,  
`merge_extra_filters` and `split_adhoc_filters_into_base_filters`.




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