Delayed Messages

Hi, I want to catch delayed message and I need a condition like below.

CREATE STREAM delayed_messages AS
SELECT 
    ...
FROM messages m
WHERE m.status = 'PENDING' AND ROWTIME < NOW() - 24 HOURS 
EMIT CHANGES;

I’ve checked the documentation but I could not find anything to solve my problem.

Can you try something like:

ROWTIME < UNIX_TIMESTAMP() - 24 HOURS 

(You need to convert 24h into a long value in ms.)

UNIX_TIMESTAMP() should be re-evaluated for every record and ROWTIME is long type anyway.

This topic was automatically closed after 30 days. New replies are no longer allowed.