Alex Pelagenko
01/09/2023, 12:13 PMImre
01/09/2023, 12:22 PMwith
as a workaround.
something like:
with
f as (select dag_id, task_id, max(timestamp) as last_finish from ti_finish group by dag_id, task_id)
select s.*, f.*
from ti_start as s
left join f on s.dag_id = f.dag_id and s.task_id = f.task_id
where s.timestamp >= f.last_finish;
>=
behaves with NULL.
not obvious because you could think that something
is always greater than NULL
which is nothing. π
but that is not the case.select to_timestamp('2023-01-09T00:00:00', 'yyyy-MM-ddTHH:mm:ss') >= NULL from <table>;
gives false
JM
01/09/2023, 12:36 PMAlex Pelagenko
01/09/2023, 12:46 PM