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
...
Stream ends
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 ...

-----Ursprüngliche Nachricht-----
Von: sqlite-users [mailto:[email protected]] Im 
Auftrag von Nelson, Erik - 2
Gesendet: Donnerstag, 25. Jänner 2018 20:03
An: SQLite mailing list <[email protected]>
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


----------------------------------------------------------------------
This message, and any attachments, is for the intended recipient(s) only, may 
contain information that is privileged, confidential and/or proprietary and 
subject to important terms and conditions available at 
http://www.bankofamerica.com/emaildisclaimer.   If you are not the intended 
recipient, please delete this message.
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___________________________________________
 Gunter Hick | Software Engineer | Scientific Games International GmbH | 
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 
1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to