Re: [EXTERNAL] sqlite as 'streaming mode' query engine?
If your stream mode virtual table stalls in it's xNext method until the next row from the stream is available (or the stream is closed, in which case it needs to set an EOF flag for the xEof method to return), then each row will be aggregated as it becomes available. The result will not be available until after the stream is closed.
Receive row a
Aggregate row a
Receive row b
Aggregate row b
xEof returns true
result row(s) returned
If your stream is not repeatable, be sure to make it the primary table in any join, i.e. SELECT ... FROM <stream> CROSS JOIN ...
Von: sqlite-users [mailto:[hidden email]] Im Auftrag von Nelson, Erik - 2
Gesendet: Donnerstag, 25. Jänner 2018 20:03
An: SQLite mailing list <[hidden email]>
Betreff: [EXTERNAL] [sqlite] sqlite as 'streaming mode' query engine?
Sqlite aggregation functions receive one call for each row in the underlying results set. Has anyone on the list done a virtual table that's a based on a stream?
Something conceptually along the lines of
Insert row a
Insert row b
begin aggregation on rows a, b
insert row c
insert row d
update aggregation with rows c, d
finish aggregation when the stream of rows ends