US 11,809,425 B1
Function memoization in query processing system
Raja Suresh Krishna Balakrishnan, Fremont, CA (US); Thierry Cruanes, San Mateo, CA (US); Yujie Li, Santa Clara, CA (US); Subramanian Muralidhar, Mercer Island, WA (US); David Schultz, Piedmont, CA (US); and Jiaqi Yan, Menlo Park, CA (US)
Assigned to Snowflake Inc., Bozeman, MT (US)
Filed by Snowflake Inc., Bozeman, MT (US)
Filed on Aug. 15, 2022, as Appl. No. 17/819,758.
Claims priority of provisional application 63/366,036, filed on Jun. 8, 2022.
Int. Cl. H04L 29/06 (2006.01); G06F 16/2453 (2019.01); G06F 21/53 (2013.01)
CPC G06F 16/24539 (2019.01) [G06F 21/53 (2013.01); G06F 2221/034 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A data platform comprising:
at least one processor; and
at least one memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform operations comprising:
based on detecting a first execution of a memoizable function, performing the first execution by performing operations comprising:
generating a first key based on user identification of a first user having ownership of a first process performing the first execution and metadata of one or more database objects operated on by the memoizable function, the metadata comprising a modification history of the one or more database objects; and
generating a first result for the memoizable function based on the one or more database objects; and
based on detecting a second execution of the memoizable function, performing the second execution of the memoizable function by performing operations comprising:
generating a second key based on user identification of a second user having ownership of a second process performing the second execution and the metadata of the one or more database objects operated on by the memoizable function;
based on determining the second key is equal to the first key, reusing the first result of the first execution as a second result for the second execution; and
based on determining the second key is not equal to the first key, generating the second result for the second execution of the function based on the one or more database objects.