Closed erikamundson closed 3 months ago
I was able to narrow it down to the query below. In this case cell_id
and step_type
are string columns. update_ts
is a timestamp with time zone. It seems be related to the filter
clause because it works when I take that out.
The table is around 5B rows (and larger than the query.max-memory
limit) if that makes a difference.
select
cell_id,
max(update_ts) filter (where step_type = 'Rest') as last_rest_update
from delta.cycling.details
group by cell_id
@dain can you take a look?
Self contained repro
select
cell_id,
max(update_ts) filter (where step_type = 'Rest')
FROM (
VALUES
('cell_id', 'Rest', current_timestamp(3)),
('cell_id', 'Rest', current_timestamp(3))
) AS t(cell_id, step_type, update_ts)
CROSS JOIN UNNEST (sequence(1, 1000)) AS a(e)
group by cell_id;
@erikamundson can you please check whether https://github.com/trinodb/trino/pull/21049 fixes the problem for you?
@findepi I'm not able to test this on our actual data currently, but it does fix your self-contained reproduction so I think it should fix our problem as well.
Hi, I'm getting this error on Trino 440 (this is the full trace).
Has happened on a couple queries so far. They're pretty large queries so I'm not sure what operation it's coming from but will update with more info. This is using the Delta Lake connector if that matters.