IP Library › Granted Patent US 12,242,457
Granted Patent B2
US 12,242,457 · App. 18/459,256 · Granted Mar 4, 2025

Query processing of stream objects using stream expansion

Inventors: Istvan Cseri (Seattle, WA); Tyler Jones (Redwood City, CA); Daniel Mills (Seattle, WA); Daniel E. Sotolongo (Seattle, WA)
Assignee: Snowflake Inc.
G06F16/2358G06F16/2282G06F16/2456G06F16/24568G06F16/278
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,242,457
App. No.
18/459,256
Granted
Mar 4, 2025
Kind
B2
Abstract

Provided herein are systems and methods for a stream object configuration, including query processing of stream objects using stream expansion. For example, a method includes decoding a query to obtain a first data processing operation and a first stream object. The first stream object is associated with a view on a base table. A first stream expansion on the first stream object is performed. The first stream expansion is based on generating a second stream object on the base table. A second stream expansion of the second stream object is performed. The second stream expansion is based on replacing the second stream object with at least a second data processing operation. The query is executed based on completing the first data processing operation and the at least a second data processing operation.

Claims (77)

1. A system comprising:

at least one hardware processor; and

at least one memory storing instructions that cause the at least one hardware processor to perform operations comprising:

decoding a query to obtain a first query plan with a first data processing operation and a first stream object, the first stream object in the first query plan associated with a view on a base table;

performing a first stream expansion on the first stream object to generate a second query plan, the first stream expansion based on generating a second stream object on the base table within the second query plan;

performing a second stream expansion of the second stream object within the second query plan, the second stream expansion based on replacing the second stream object with at least a second data processing operation; and

executing the query based on completing the first data processing operation and the at least a second data processing operation.

2. The system of claim 1 , wherein the instructions further cause the at least one hardware processor to perform operations comprising:

determining at least a third data processing operation associated with the first stream object, the first stream object including a plurality of versions of the view on the base table and a corresponding plurality of time stamps of times the plurality of versions of the view are generated by executing the at least third data processing operation.

3. The system of claim 2 , wherein the instructions to perform the first stream expansion further cause the at least one hardware processor to perform operations comprising:

determining the plurality of versions of the view in the first stream object are based on a table scan operation on the base table.

4. The system of claim 3 , wherein the instructions to perform the first stream expansion further cause the at least one hardware processor to perform operations comprising:

replacing the first stream object with at least a filter operation and the table scan operation on the base table.

5. The system of claim 4 , wherein the instructions to perform the first stream expansion further cause the at least one hardware processor to perform operations comprising:

generating a revised query plan of the first stream object from the first stream expansion, the revised query plan including the first data processing operation, a project operation, the filter operation, and the table scan operation on the base table.

6. The system of claim 5 , wherein the instructions further cause the at least one hardware processor to perform operations comprising:

generating a third query plan based on the revised query plan and the second stream expansion; and

executing the query based on completing operations in the third query plan.

7. The system of claim 1 , wherein the instructions to perform the second stream expansion further cause the at least one hardware processor to perform operations comprising:

replacing the second stream object with a join operation.

8. The system of claim 7 , wherein the instructions further cause the at least one hardware processor to perform operations comprising:

performing a first table scan operation of the base table to obtain added data, the added data being added to the base table as a result of the executing the at least second data processing operation.

9. The system of claim 8 , wherein the instructions further cause the at least one hardware processor to perform operations comprising:

performing a second table scan operation of the base table to obtain deleted data, the deleted data being deleted from the base table as a result of the executing the at least second data processing operation.

10. The system of claim 9 , wherein the instructions further cause the at least one hardware processor to perform operations comprising:

applying the join operation to the added data and the deleted data; and

outputting a result of the applying the join operation.

11. A method comprising:

decoding, by at least one hardware processor, a query to obtain a first query plan with a first data processing operation and a first stream object, the first stream object in the first query plan associated with a view on a base table;

performing a first stream expansion on the first stream object to generate a second query plan, the first stream expansion based on generating a second stream object on the base table within the second query plan;

performing a second stream expansion of the second stream object within the second query plan, the second stream expansion based on replacing the second stream object with at least a second data processing operation; and

executing the query based on completing the first data processing operation and the at least a second data processing operation.

12. The method of claim 11 , further comprising:

determining at least a third data processing operation associated with the first stream object, the first stream object including a plurality of versions of the view on the base table and a corresponding plurality of time stamps of times the plurality of versions of the view are generated by executing the at least third data processing operation.

13. The method of claim 12 , wherein performing the first stream expansion further comprises:

determining the plurality of versions of the view in the first stream object are based on a table scan operation on the base table.

14. The method of claim 13 , wherein performing the first stream expansion further comprises:

replacing the first stream object with at least a filter operation and the table scan operation on the base table.

15. The method of claim 14 , wherein performing the first stream expansion further comprises:

generating a revised query plan of the first stream object from based on the first stream expansion, the revised query plan including the first data processing operation, a project operation, the filter operation, and the table scan operation on the base table.

16. The method of claim 15 , further comprising:

generating a third query plan based on the revised query plan and the second stream expansion; and

executing the query based on completing operations in the third query plan.

17. The method of claim 11 , wherein performing the second stream expansion further comprises:

replacing the second stream object with a join operation.

18. The method of claim 17 , further comprising:

performing a first table scan operation of the base table to obtain added data, the added data being added to the base table as a result of the executing the at least second data processing operation.

19. The method of claim 18 , further comprising:

performing a second table scan operation of the base table to obtain deleted data, the deleted data being deleted from the base table as a result of the executing the at least second data processing operation.

20. The method of claim 19 , further comprising:

applying the join operation to the added data and the deleted data; and

outputting a result of the applying the join operation.

21. A computer-storage medium comprising instructions that, when executed by one or more processors of a machine, configure the machine to perform operations comprising:

decoding a query to obtain a first query plan with a first data processing operation and a first stream object, the first stream object in the first query plan associated with a view on a base table;

performing a first stream expansion on the first stream object to generate a second query plan, the first stream expansion based on generating a second stream object on the base table within the second query plan;

performing a second stream expansion of the second stream object within the second query plan, the second stream expansion based on replacing the second stream object with at least a second data processing operation; and

executing the query based on completing the first data processing operation and the at least a second data processing operation.

22. The computer-storage medium of claim 21 , the operations further comprising:

determining at least a third data processing operation associated with the first stream object, the first stream object including a plurality of versions of the view on the base table and a corresponding plurality of time stamps of times the plurality of versions of the view are generated by executing the at least third data processing operation.

23. The computer-storage medium of claim 22 , wherein the operations for performing the first stream expansion further comprise:

determining the plurality of versions of the view in the first stream object are based on a table scan operation on the base table.

24. The computer-storage medium of claim 23 , wherein the operations for performing the first stream expansion further comprise:

replacing the first stream object with at least a filter operation and the table scan operation on the base table.

25. The computer-storage medium of claim 24 , wherein the operations for performing the first stream expansion further comprise:

generating a revised query plan of the first stream object from the first stream expansion, the revised query plan including the first data processing operation, a project operation, the filter operation, and the table scan operation on the base table.

26. The computer-storage medium of claim 25 , the operations further comprising:

generating a third query plan based on the revised query plan and the second stream expansion; and

executing the query based on completing operations in the third query plan.

27. The computer-storage medium of claim 21 , wherein the operations for performing the second stream expansion further comprise:

replacing the second stream object with a join operation.

28. The computer-storage medium of claim 27 , the operations further comprising:

performing a first table scan operation of the base table to obtain added data, the added data being added to the base table as a result of the executing the at least second data processing operation.

29. The computer-storage medium of claim 28 , the operations further comprising:

performing a second table scan operation of the base table to obtain deleted data, the deleted data being deleted from the base table as a result of the executing the at least second data processing operation.

30. The computer-storage medium of claim 29 , the operations further comprising:

applying the join operation to the added data and the deleted data; and

outputting a result of the applying the join operation.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 31, 2023
From: CSERI, ISTVAN; JONES, TYLER; MILLS, DANIEL; SOTOLONGO, DANIEL E.
To: SNOWFLAKE INC.
Reel/Frame 064768/0775 →
Continuity (4)
Continuation 18048912 · Oct 24, 2022
Continuation 17650604 · Feb 10, 2022
Continuation 17460974 · Aug 30, 2021
Related Publication 20230418807A1 · Dec 28, 2023
References Cited (33)
US 11301451B1 · Cseri et al. · 2022 [cited by applicant]
US 11514023B1 · Cseri et al. · 2022 [cited by applicant]
US 20030164856A1 · Prager · 2003 [cited by examiner]
US 20040015783A1 · Lennon et al. · 2004 [cited by applicant]
US 20040139396A1 · Gelernter · 2004 [cited by examiner]
US 20040181543A1 · Wu et al. · 2004 [cited by applicant]
US 20050060647A1 · Doan et al. · 2005 [cited by applicant]
US 20080005182A1 · Gauthier · 2008 [cited by examiner]
US 20120072412A1 · Bestgen · 2012 [cited by examiner]
US 20140095471A1 · Deshmukh et al. · 2014 [cited by applicant]
US 20140258832A1 · Hepp · 2014 [cited by examiner]
US 20190073195A1 · Arnold et al. · 2019 [cited by applicant]
US 20190361891A1 · Griffith · 2019 [cited by examiner]
US 20200258313A1 · Chen et al. · 2020 [cited by applicant]
US 20210117437A1 · Gibson · 2021 [cited by examiner]
US 20210117857A1 · Sriharsha · 2021 [cited by examiner]
US 20210240690A1 · Cseri · 2021 [cited by examiner]
US 20210389883A1 · Derryberry · 2021 [cited by examiner]
US 20230092367A1 · Cseri et al. · 2023 [cited by applicant]
WO 2023034714 · 2023 [cited by applicant]
“U.S. Appl. No. 17/460,974, Non Final Office Action mailed Oct. 28, 2021”, 12 pgs. [cited by applicant]
“U.S. Appl. No. 17/460,974, Examiner Interview Summary mailed Dec. 30, 2021”, 2 pgs. [cited by applicant]
“U.S. Appl. No. 17/460,974, Response filed Jan. 3, 2022 to Non Final Office Action mailed Oct. 28, 2021”, 13 pgs. [cited by applicant]
“U.S. Appl. No. 17/460,974, Notice of Allowance mailed Jan. 20, 2022”, 7 pgs. [cited by applicant]
“U.S. Appl. No. 17/650,604, Non Final Office Action mailed Apr. 12, 2022”, 13 pgs. [cited by applicant]
“U.S. Appl. No. 17/650,604, Response filed Jul. 11, 2022 to Non Final Office Action mailed Apr. 12, 2022”, 12 pgs. [cited by applicant]
“U.S. Appl. No. 17/650,604, Notice of Allowance mailed Aug. 2, 2022”, 7 pgs. [cited by applicant]
“International Application Serial No. PCT US2022 075440, International Search Report mailed Dec. 7, 2022”, 2 pgs. [cited by applicant]
“International Application Serial No. PCT US2022 075440, Written Opinion mailed Dec. 7, 2022”, 9 pgs. [cited by applicant]
“U.S. Appl. No. 18/048,912, Non Final Office Action mailed Mar. 16, 2023”, 18 pgs. [cited by applicant]
“U.S. Appl. No. 18/048,912, Response filed Jun. 16, 2023 to Non Final Office Action mailed Mar. 16, 2023”, 12 pgs. [cited by applicant]
“U.S. Appl. No. 18/048,912, Notice of Allowance mailed Jul. 20, 2023”, 7 pgs. [cited by applicant]
“European Application Serial No. 22865691.4, Extended European Search Report mailed Oct. 9, 2024”, 11 pgs. [cited by applicant]