Open fordfrog opened 1 month ago
issue #815 is probably related
so i tried the patch from the mentioned issue but it didn't solve my issue:
# call refresh_continuous_aggregate('public.tick_market_bars_s1', '2024-06-03 04:00:00', '2024-06-03 04:10:00');
ERROR: bytes_ is null
CONTEXT: SQL statement "INSERT INTO _timescaledb_internal._materialized_hypertable_28 SELECT * FROM _timescaledb_internal._partial_view_28 AS I WHERE I.bar_start >= $1 AND I.bar_start < $2 ;"
timescaledb toolkit is the latest from the main branch as of now (1.19.0-dev - beac6d58a1077e082824083b19c0d216cefad5f6). timescaledb is 2.17.0
when refreshing an aggregate, i get this error:
it is caused by this statement in the aggregate sql:
i tracked down the issue to one ticker that has only one record for the specified period and that record is filtered out by the filter clause. this is the complete simplified select:
removing the filter clause makes the select work without issues.
so my guess is, when checking whether there are any records to be aggregated, the filter clause is ignored, which in this case results in no records being provided and crashing on the unwrap.
i did not notice this issue with timescaledb < 1.17.0 before, but i didn't test it now.