This content has been marked as final. Show 3 replies
Your latter query is an eager pattern, could you try with (A+, B)? And I think you can have B as count(A.*) = 3
I just tried (A+ B) to no avail. Feels like I'm missing something obvious, but I can't see any typos and the compiler isn't giving me any errors.
Got it to work by using (A+ B) as pattern and adding MATCH ALL as follows:
select blah.deviceName from inputChannel
partition by deviceName
A.deviceName as deviceName
PATTERN (A+ B)
A AS (A.currentValue = 1),
B AS (count(A.*) >= 3)
) as blah
However, this doesn't exactly match the explanation in example 21-6 and others related in the CQL guide.