我正在测试'和'运算符的用法,并使用了文档中提到的示例:
from every a1 = OrderStock1[action == "buy"] and
a2 = OrderStock2[action == "buy"] ->
b1 = StockExchangeStream[price > 70] ->
b2 = StockExchangeStream[price > 75]
select a1.action as action, b1.price as priceA, b2.price as priceB
insert into StockQuote partition by stockSymbol
我注意到如果没有事件发送到OrderStock2流,仍然会发生匹配。
文档中“和”的定义是:以任何顺序出现两个事件。我的理解是,为了匹配发生,OrderStock1和OrderStock2都应该以任何顺序接收事件,然后在StockExchangeStream中收到满足价格条件的2个事件。
即使没有事件发送到OrderStock2流,也会发生匹配原因的任何解释?