seunggabi commented on code in PR #44500:
URL: https://github.com/apache/superset/pull/44500#discussion_r4070450279


##########
tests/unit_tests/models/core_test.py:
##########
@@ -217,6 +217,12 @@ class OldDBEngineSpec(BaseEngineSpec):
             Database(),
             "1672536225000",
         ),
+        (
+            datetime(2023, 1, 1, 1, 23, 45, 600000),
+            TableColumn(python_date_format="epoch_us"),
+            Database(),
+            "1672536225000000",

Review Comment:
   Intentional and pre-existing: `dttm_sql_literal` has always truncated to 
whole seconds before scaling for `epoch_ms` (`int(dttm.timestamp()) * 1000`), 
and `epoch_us` follows the same rule so the three formats stay consistent. 
Time-range boundaries are whole seconds in practice, and keeping `int()` on the 
seconds avoids the float precision loss that multiplying `timestamp()` directly 
would introduce (see the approving review above). The test pins that shared 
contract for all three formats.



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