bito-code-review[bot] commented on code in PR #44500:
URL: https://github.com/apache/superset/pull/44500#discussion_r4068775474
##########
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:
<div>
<div id="suggestion">
<div id="issue"><b>Epoch us truncation</b></div>
<div id="fix">
Expected epoch_us literal drops the 600000 µs component:
datetime(2023,1,1,1,23,45,600000) UTC is 1672536225600000 µs, not
1672536225000000. The value comes from `dttm_sql_literal` doing
`int(dttm.timestamp()) * EPOCH_FORMATS[tf]`, truncating to whole seconds before
scaling. This test locks in the truncation instead of catching it.
</div>
</div>
<small><i>Code Review Run #947069</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]