kaxil commented on code in PR #45002:
URL: https://github.com/apache/airflow/pull/45002#discussion_r1889718810


##########
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:
   @amoghrajesh You will get the same problem with that:
   
   ```
   sqlite> SELECT printf('%.6f', (julianday('2024-06-01T01:00:00') - 
julianday('2024-06-01T00:00:00')) * 86400);
   3599.999987
   ```



##########
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:
   @amoghrajesh You will get the same problem with that:
   
   ```sql
   sqlite> SELECT printf('%.6f', (julianday('2024-06-01T01:00:00') - 
julianday('2024-06-01T00:00:00')) * 86400);
   3599.999987
   ```



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

Reply via email to