john-bodley commented on code in PR #25147:
URL: https://github.com/apache/superset/pull/25147#discussion_r1367446285


##########
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(
+            value: Any, col: BaseColumn, date_format: str
+        ) -> int | str:
+            if not isinstance(value, int):
+                return value
+            if date_format in {"epoch_ms", "epoch_s"}:
+                if date_format == "epoch_s":
+                    value = str(value)

Review Comment:
   If `value` is coming from the frontend and is a timestamp in milliseconds 
shouldn't `epoch_s` be `str(value / 1000)` and `epoch_ms` be `str(value)`?



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