You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today we have attempted migration from Trino 419 to Trino 464 and we started seeing a few queries failing with memory limit issues:
The query in question is this:
SELECT "foo" FROM
(WITH om_stores AS
(SELECT s.some_id,
COALESCE(BOOL_OR(ent.feature_name = 'test' AND ent.disabled_at IS NULL), False) AS om
FROM "iceberg"."dbname"."tblname" s
LEFT JOIN iceberg.dbname2.data_history ent ON s.some_id = ent.some_id
WHERE s.deleted_at IS NULL GROUP BY s.some_id)
SELECT CAST(o.day_partition AS DATE) AS analysis_date,
o.server_region,
o.foo_slot AS foo,
o.foo_slot
FROM om_stores om
LEFT JOIN iceberg.dbname3.foo_orders o ON om.some_id = o.some_id
WHERE DATE(o.day_partition) >= current_date - INTERVAL '60' DAY
GROUP BY o.day_partition, o.server_region, o.foo_slot) AS "virtual_table"
WHERE "analysis_date" >= DATE '2024-10-14' AND "analysis_date" < DATE '2024-11-14'
GROUP BY "foo", date_trunc('week', CAST("analysis_date" AS TIMESTAMP))
LIMIT 1000;
Changing WHERE DATE(o.day_partition) >= current_date - INTERVAL '60' DAY to WHERE o.day_partition >= '2024-09-15'
Immediately returns everything back to normal.
While this query itself is obviously not great, but this is what users came up with and we can't just break their stuff.
Explain shows a lack of missing filter for foo_orders table in Trino 464 while this example is copied from 419: (CAST("day_partition_6" AS date) >= DATE '2024-09-15') AND (CAST("day_partition_6" AS DATE) >= DATE '2024-10-14') AND (CAST("day_partition_6" AS DATE) < DATE '2024-11-14')
All tables are Iceberg tables.
The text was updated successfully, but these errors were encountered:
Today we have attempted migration from Trino 419 to Trino 464 and we started seeing a few queries failing with memory limit issues:
The query in question is this:
It fails like this:
Changing
WHERE DATE(o.day_partition) >= current_date - INTERVAL '60' DAY
toWHERE o.day_partition >= '2024-09-15'
Immediately returns everything back to normal.
While this query itself is obviously not great, but this is what users came up with and we can't just break their stuff.
Explain shows a lack of missing filter for foo_orders table in Trino 464 while this example is copied from 419:
(CAST("day_partition_6" AS date) >= DATE '2024-09-15') AND (CAST("day_partition_6" AS DATE) >= DATE '2024-10-14') AND (CAST("day_partition_6" AS DATE) < DATE '2024-11-14')
All tables are Iceberg tables.
The text was updated successfully, but these errors were encountered: