US 12,353,480 B2
Efficient execution of database queries on streaming data
Dhruba Borthakur, Sunnyvale, CA (US); Venkat Venkataramani, San Mateo, CA (US); Tudor Bosman, Hayward, CA (US); Igor Canadi, San Francisco, CA (US); Kshitij Wadhwa, San Mateo, CA (US); Karen Li, San Mateo, CA (US); and Shruti Bhat, Newark, CA (US)
Assigned to Rockset, Inc., San Francisco, CA (US)
Filed by Rockset, Inc., San Mateo, CA (US)
Filed on Jun. 23, 2023, as Appl. No. 18/213,702.
Claims priority of provisional application 63/390,854, filed on Jul. 20, 2022.
Prior Publication US 2024/0028648 A1, Jan. 25, 2024
Int. Cl. G06F 7/00 (2006.01); G06F 16/903 (2019.01); G06F 16/906 (2019.01)
CPC G06F 16/906 (2019.01) [G06F 16/90335 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A computer-implemented method for processing queries, comprising:
receiving, by a database system, a request to process records received by the database system, the request specifying a database language query specifying a grouping clause and one or more aggregate result values based on grouping sets generated by the grouping clause;
generating a pre-aggregation table based on the database language query;
generating based on the database language query:
an ingest query configured to generate data for populating the pre-aggregation table, and
a completion query configured to process data of the pre-aggregation table to obtain results of the database language query;
repeatedly performing:
receiving a set of input records,
executing the ingest query to generate at least one pre-aggregation record from the set of input records, and
updating the data of the pre-aggregation table based on the at least one pre-aggregation record by determining whether hash values associated with records in the pre-aggregation table correspond with a hash value associated with the at least one pre-aggregation record;
responsive to updating the data stored in the pre-aggregation table, generating a result set by executing the completion query on the data stored in the pre-aggregation table; and
sending the result set to a requestor of the results.