bito-code-review[bot] commented on code in PR #44500:
URL: https://github.com/apache/superset/pull/44500#discussion_r4070451660


##########
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:
   <!-- Bito Reply -->
   The suggestion from the reviewer highlights that the current implementation 
truncates the microsecond component of the datetime object before scaling, 
which leads to a loss of precision. While the existing test pins this behavior 
to maintain consistency across formats, the reviewer is pointing out that this 
approach effectively locks in a loss of data rather than accurately 
representing the full timestamp. Whether to apply this suggestion depends on 
whether the project's requirement for consistency across `epoch_ms` and 
`epoch_us` outweighs the need for microsecond-level accuracy in the `epoch_us` 
format.
   
   **tests/unit_tests/models/core_test.py**
   ```
   +        (
   +            datetime(2023, 1, 1, 1, 23, 45, 600000),
   +            TableColumn(python_date_format="epoch_us"),
   +            Database(),
   +            "1672536225000000",
   ```



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