IP Library › Granted Patent US 12,724,761
Granted Patent B2
US 12,724,761 · App. 18/944,963 · Granted Sep 1, 2026

Processing user-defined functions (UDFs) using multiple UDF clients

Inventors: Elliott Brossard (Kirkland, WA); Chong Han (Bellevue, WA); Igor Zinkovsky (Redmond, WA)
Assignee: Snowflake Inc.
G06F16/2291G06F16/221G06F16/248G06F16/258G06F16/27
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,724,761
App. No.
18/944,963
Granted
Sep 1, 2026
Kind
B2
Abstract

A method to process UDFs includes performing, by at least one hardware processor of a database system, a resolution of application components to determine a plurality of resolved components of an application and a plurality of data types corresponding to the plurality of resolved components. The method includes instantiating a plurality of UDF clients. The plurality of UDF clients are associated with the plurality of data types. The method includes detecting a received database query specifies a data type of the plurality of data types. The method includes executing the received database query at a UDF client of the plurality of UDF clients.

Claims (77)

1 . A method comprising:

performing, by at least one hardware processor of a database system, a resolution of application components to determine a plurality of resolved components of an application and a plurality of data types corresponding to the plurality of resolved components;

instantiating a plurality of user-defined function (UDF) clients, the plurality of UDF clients associated with the plurality of data types;

processing a received database query with a mapping engine to detect that the received database query specifies a data type of the plurality of data types;

reformatting database data specified by the received database query using a data transport mechanism of a UDF client to generate reformatted data, the reformatted data comprising columnar data;

forwarding the columnar data to an execution environment corresponding to the UDF client; and

executing the received database query at the UDF client of the plurality of UDF clients.

2 . The method of claim 1 , further comprising:

determining a plurality of dependencies of the application to determine the plurality of resolved components.

3 . The method of claim 2 , further comprising:

determining one or more of at least one software package, a code version, and a code library associated with UDF code of the application to determine the plurality of dependencies.

4 . The method of claim 1 , further comprising:

instantiating a first execution process within a computing node of the database system.

5 . The method of claim 4 , further comprising:

configuring the plurality of UDF clients within the first execution process, the plurality of UDF clients corresponding to a plurality of execution environments.

6 . The method of claim 5 , further comprising:

selecting the UDF client of the plurality of UDF clients based on the data type of the received database query.

7 . The method of claim 6 , further comprising:

forwarding using the UDF client, the received query to an execution environment of the plurality of execution environments to generate results data, the execution environment corresponding to the UDF client.

8 . The method of claim 5 , further comprising:

instantiating a second execution process within the computing node; and

instantiating a user code runtime within the second execution process.

9 . The method of claim 8 , further comprising:

instantiating the plurality of execution environments corresponding to the plurality of resolved components as UDF server processes within the user code runtime; and

instantiating the second execution process as a sandbox process within the computing node.

10 . 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:

performing a resolution of application components to determine a plurality of resolved components of an application and a plurality of data types corresponding to the plurality of resolved components;

instantiating a plurality of user-defined function (UDF) clients, the plurality of UDF clients associated with the plurality of data types;

processing a received database query with a mapping engine to detect that the received database query specifies a data type of the plurality of data types;

reformatting database data specified by the received database query using a data transport mechanism of a UDF client to generate reformatted data, the reformatted data comprising columnar data;

forwarding the columnar data to an execution environment corresponding to the UDF client; and

executing the received database query at the UDF client of the plurality of UDF clients.

11 . The system of claim 10 , the operations further comprising:

determining a plurality of dependencies of the application to determine the plurality of resolved components.

12 . The system of claim 11 , the operations further comprising:

determining one or more of at least one software package, a code version, and a code library associated with UDF code of the application to determine the plurality of dependencies.

13 . The system of claim 10 , the operations further comprising:

instantiating a first execution process within a computing node of a database system.

14 . The system of claim 13 , the operations further comprising:

configuring the plurality of UDF clients within the first execution process, the plurality of UDF clients corresponding to a plurality of execution environments.

15 . The system of claim 14 , the operations further comprising:

selecting the UDF client of the plurality of UDF clients based on the data type of the received database query.

16 . The system of claim 15 , the operations further comprising:

forwarding using the UDF client, the received query to an execution environment of the plurality of execution environments to generate results data, the execution environment corresponding to the UDF client.

17 . The system of claim 14 , the operations further comprising:

instantiating a second execution process within the computing node; and

instantiating a user code runtime within the second execution process.

18 . The system of claim 17 , the operations further comprising:

instantiating the plurality of execution environments corresponding to the plurality of resolved components as UDF server processes within the user code runtime; and

instantiating the second execution process as a sandbox process within the computing node.

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

performing a resolution of application components to determine a plurality of resolved components of an application and a plurality of data types corresponding to the plurality of resolved components;

instantiating a plurality of user-defined function (UDF) clients, the plurality of UDF clients associated with the plurality of data types;

processing a received database query with a mapping engine to detect that the received database query specifies a data type of the plurality of data types;

reformatting database data specified by the received database query using a data transport mechanism of a UDF client to generate reformatted data, the reformatted data comprising columnar data;

forwarding the columnar data to an execution environment corresponding to the UDF client; and

executing the received database query at the UDF client of the plurality of UDF clients.

20 . The computer-storage medium of claim 19 , the operations further comprising:

determining a plurality of dependencies of the application to determine the plurality of resolved components.

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

determining one or more of at least one software package, a code version, and a code library associated with UDF code of the application to determine the plurality of dependencies.

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

instantiating a first execution process within a computing node of a database system.

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

configuring the plurality of UDF clients within the first execution process, the plurality of UDF clients corresponding to a plurality of execution environments.

24 . The computer-storage medium of claim 23 , the operations further comprising:

selecting the UDF client of the plurality of UDF clients based on the data type of the received database query.

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

forwarding using the UDF client, the received query to an execution environment of the plurality of execution environments to generate results data, the execution environment corresponding to the UDF client.

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

instantiating a second execution process within the computing node; and

instantiating a user code runtime within the second execution process.

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

instantiating the plurality of execution environments corresponding to the plurality of resolved components as UDF server processes within the user code runtime; and

instantiating the second execution process as a sandbox process within the computing node.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 12, 2024
From: BROSSARD, ELLIOTT; HAN, CHONG; ZINKOVSKY, IGOR
To: SNOWFLAKE INC.
Reel/Frame 069235/0292 →
Continuity (4)
Continuation 18338938 · Jun 21, 2023
Continuation 18060085 · Nov 30, 2022
Provisional Application 63366282 · Jun 13, 2022
Related Publication 20250068616A1 · Feb 27, 2025
References Cited (38)
US 10534770B2 · Chen et al. · 2020 [cited by applicant]
US 11216582B2 · Lee et al. · 2022 [cited by applicant]
US 11361026B2 · Brossard et al. · 2022 [cited by applicant]
US 11487778B1 · Dageville et al. · 2022 [cited by applicant]
US 11550845B2 · Brossard et al. · 2023 [cited by applicant]
US 11645298B1 · Dageville et al. · 2023 [cited by applicant]
US 11726976B1 · Brossard et al. · 2023 [cited by applicant]
US 11921700B1 · Al Mahmood et al. · 2024 [cited by applicant]
US 11928110B2 · Chintala et al. · 2024 [cited by applicant]
US 11928129B1 · Motivala et al. · 2024 [cited by applicant]
US 11928157B2 · Bijon et al. · 2024 [cited by applicant]
US 11929986B1 · Igram et al. · 2024 [cited by applicant]
US 11930045B1 · Baker et al. · 2024 [cited by applicant]
US 12174817B2 · Brossard · 2024 [cited by examiner]
US 20060041544A1 · Santosuosso · 2006 [cited by examiner]
US 20120191642A1 · George · 2012 [cited by examiner]
US 20170139931A1 · Wang · 2017 [cited by applicant]
US 20170140064A1 · Wang · 2017 [cited by applicant]
US 20210406311A1 · Brossard et al. · 2021 [cited by applicant]
US 20220114257A1 · McKerchar · 2022 [cited by examiner]
US 20220237231A1 · Brossard et al. · 2022 [cited by applicant]
US 20230080220A1 · Kläbe · 2023 [cited by examiner]
US 20230097756A1 · Brossard et al. · 2023 [cited by applicant]
US 20230147989A1 · Dageville et al. · 2023 [cited by applicant]
US 20230252039A1 · Dageville et al. · 2023 [cited by applicant]
US 20230409552A1 · Brossard · 2023 [cited by examiner]
US 20250068616A1 · Brossard · 2025 [cited by examiner]
An Architecture for Compiling UDF-centric Workflows (Year: 2015). [cited by examiner]
UDF to SQL Translation through Compositional Lazy Inductive Synthesis (Year: 2021). [cited by examiner]
“Alipay / tensorflow_io”, Dataset and Filesystem Extension [online]. Retrieved from the Internet: <URL: https://github.com/alipay/tensorflow_io/blob/master/tensorflow_io/arrow/kernels/arrow_stream_client_unix.cc>, (2022… [cited by applicant]
“U.S. Appl. No. 18/060,085, Non Final Office Action mailed Jan. 31, 2023”, 6 pgs. [cited by applicant]
“U.S. Appl. No. 18/060,085, Notice of Allowance mailed May 22, 2023”, 10 pgs. [cited by applicant]
“U.S. Appl. No. 18/060,085, Response filed Apr. 26, 2023 to Non Final Office Action mailed Jan. 31, 2023”, 11 pgs. [cited by applicant]
“U.S. Appl. No. 18/338,938, Non Final Office Action mailed Mar. 22, 2024”, 7 pgs. [cited by applicant]
“U.S. Appl. No. 18/338,938, Notice of Allowance mailed Aug. 12, 2024”, 8 pgs. [cited by applicant]
“U.S. Appl. No. 18/338,938, Response filed Jun. 14, 2024 to Non Final Office Action mailed Mar. 22, 2024”, 9 pgs. [cited by applicant]
“Datasets & Dataloaders”, [online]. (c) 2023, PyTorch. Retrieved from the Internet: <URL: https://pytorch.org/tutorials/beginner/basics/data_tutorial.html>, (2023), 5 pgs. [cited by applicant]
“Tfio.arrow.ArrowDataset”, TensorFlow I/O Apache Arrow Dataset [online]. Retrieved from the Internet: <URL: https://www.tensorflow.org/io/api_docs/python/tfio/arrow/ArrowDataset>, (updated Feb. 15, 2022), 68 pgs. [cited by applicant]