john-bodley commented on code in PR #25147:
URL: https://github.com/apache/superset/pull/25147#discussion_r1364923620
##########
superset/common/query_object_factory.py:
##########
@@ -102,3 +113,54 @@ def _process_row_limit(
# light version of the view.utils.core
# import view.utils require application context
# Todo: move it and the view.utils.core to utils package
+
+ def _process_filters(
+ self, datasource: BaseDatasource, query_filters:
list[QueryObjectFilterClause]
+ ) -> list[QueryObjectFilterClause]:
Review Comment:
Why are we returning the filters where in actuality we're mutating the
`query_filters` in place?
##########
superset/common/query_object_factory.py:
##########
@@ -102,3 +113,54 @@ def _process_row_limit(
# light version of the view.utils.core
# import view.utils require application context
# Todo: move it and the view.utils.core to utils package
+
+ def _process_filters(
+ self, datasource: BaseDatasource, query_filters:
list[QueryObjectFilterClause]
+ ) -> list[QueryObjectFilterClause]:
+ def get_dttm_filter_value(
Review Comment:
A lot of this logic and the logic defined on lines 156-164 was already
defined
[here](https://github.com/apache/superset/blob/e7cdfeeb2c6af386ae1d9d13c460485b25407652/superset/models/helpers.py#L1272-L1300).
Wouldn't it be better (and potentially less error prone) if we adhered to the
DRY principle and reused the same helper function.
--
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]