amoghrajesh commented on code in PR #45002:
URL: https://github.com/apache/airflow/pull/45002#discussion_r1889686809
##########
airflow/models/taskinstance.py:
##########
@@ -3615,7 +3615,10 @@ def duration_expression_update(
return query.values(
{
"end_date": end_date,
- "duration": (func.julianday(end_date) -
func.julianday(cls.start_date)) * 86400,
+ "duration": func.cast(
Review Comment:
Another option is to just work with format:
```
SELECT printf('%.6f', (julianday('2024-06-01T01:00:00.123456') -
julianday('2024-06-01T00:00:00')) * 86400);
```
Which does a format and hence no rounding or any logic involved, it just
truncates the output, consistently
--
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]