Currently when you execute a query in synapse, any returned topic streams will remain open until there are no active publishers on the topic.
However, if the query includes filter expressions then its sometimes possible to determine that the topic can't possibly return any more values. For example, if I execute SELECT x FROM y WHERE x < 100, x is sorted in ascending order, and the topic has already reached x=101 then the query stream should end early even if there are active publishers.
Currently when you execute a query in synapse, any returned topic streams will remain open until there are no active publishers on the topic. However, if the query includes filter expressions then its sometimes possible to determine that the topic can't possibly return any more values. For example, if I execute
SELECT x FROM y WHERE x < 100
,x
is sorted in ascending order, and the topic has already reachedx=101
then the query stream should end early even if there are active publishers.