IP Library › Granted Patent US 12,314,694
Granted Patent B2
US 12,314,694 · App. 18/324,615 · Granted May 27, 2025

Inline compilation of user defined functions

Inventors: Elliott Brossard (Kirkland, WA); Siddharth Kulkarni (Sammamish, WA); Isaac Kunen (Seattle, WA)
Assignee: Snowflake Inc.
G06F8/44G06F9/547G06F16/245G06F16/2455G06F21/53G06F21/602G06F21/606
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,314,694
App. No.
18/324,615
Granted
May 27, 2025
Kind
B2
Abstract

Embodiments described herein provide techniques for in-line compiling of UDFs in other programming languages. These techniques enable faster programming iterations because it allows users to compile directly in the cloud processing system. Moreover, it allows the UDFs to tie into existing libraries. The compiled results are treated as sensitive and handled with appropriate security policies, as with any other user data in the system.

Claims (41)

1. A method comprising:

receiving, by a cloud processing system operating using a first programming language, a query referencing a user defined function (UDF) including a body with a code portion in a second programming language;

generating a query plan to execute the query, the query plan including at least one function associated with the UDF;

transmitting the query plan to a processing node;

providing a worker process of the processing node and providing a separate UDF server in the processing node, the UDF server and the worker process being associated with separate processors of the processing node;

transmitting the code portion of the UDF from the worker process to the UDF server via a remote call protocol, the UDF server being restricted from accessing select data accessible by the worker process;

compiling the code portion of the UDF to generate compiled results in a language-specific integration operating on the UDF server, the UDF server operating using the first programming language and the language-specific integration operating in the second programming language; and

transmitting the compiled results from the UDF server to the worker process via the remote call protocol,

generating a response to the query based on the compiled results.

2. The method of claim 1 , wherein the query plan includes a plan tree with a plurality of functions and the at least one function associated with the UDF includes a select function.

3. The method of claim 1 , wherein a compute service manager of the cloud processing system receives the query.

4. The method of claim 1 , wherein the second programming language is JAVA.

5. The method of claim 1 , wherein the second programming language is C Sharp.

6. A machine-storage medium embodying instructions that, when executed by a machine, cause the machine to perform operations comprising:

receiving, by a cloud processing system operating using a first programming language, a query referencing a user defined function (UDF) including a body with a code portion in a second programming language;

generating a query plan to execute the query, the query plan including at least one function associated with the UDF;

transmitting the query plan to a processing node;

providing a worker process of the processing node and providing a separate UDF server in the processing node, the UDF server and the worker process being associated with separate processors of the processing node;

transmitting the code portion of the UDF from the worker process to the UDF server via a remote call protocol, the UDF server being restricted from accessing select data accessible by the worker process;

compiling the code portion of the UDF to generate compiled results in a language-specific integration operating on the UDF server, the UDF server operating using the first programming language and the language-specific integration operating in the second programming language; and

transmitting the compiled results from the UDF server to the worker process via the remote call protocol,

generating a response to the query based on the compiled results.

7. The machine-storage medium of claim 6 , wherein the query plan includes a plan tree with a plurality of functions and the at least one function associated with the UDF includes a select function.

8. The machine-storage medium of claim 6 , wherein a compute service manager of the cloud processing system receives the query.

9. The machine-storage medium of claim 6 , wherein the second programming language is JAVA.

10. The machine-storage medium of claim 6 , wherein the second programming language is C Sharp.

11. A system comprising:

at least one hardware processor; and

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

receiving, by a cloud processing system operating using a first programming language, a query referencing a user defined function (UDF) including a body with a code portion in a second programming language;

generating a query plan to execute the query, the query plan including at least one function associated with the UDF;

transmitting the query plan to a processing node;

providing a worker process of the processing node and providing a separate UDF server in the processing node, the UDF server and the worker process being associated with separate processors of the processing node;

transmitting the code portion of the UDF from the worker process to the UDF server via a remote call protocol, the UDF server being restricted from accessing select data accessible by the worker process;

compiling the code portion of the UDF to generate compiled results in a language-specific integration operating on the UDF server, the UDF server operating using the first programming language and the language-specific integration operating in the second programming language; and

transmitting the compiled results from the UDF server to the worker process via the remote call protocol,

generating a response to the query based on the compiled results.

12. The system of claim 11 , wherein the query plan includes a plan tree with a plurality of functions and the at least one function associated with the UDF includes a select function.

13. The system of claim 11 , wherein a compute service manager of the cloud processing system receives the query.

14. The system of claim 11 , wherein the second programming language is JAVA.

15. The system of claim 11 , wherein the second programming language is C Sharp.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 26, 2023
From: BROSSARD, ELLIOTT; KULKARNI, SIDDHARTH; KUNEN, ISAAC
To: SNOWFLAKE INC.
Reel/Frame 063775/0803 →
Continuity (4)
Continuation 17823621 · Aug 31, 2022
Continuation 17389871 · Jul 30, 2021
Provisional Application 63197712 · Jun 7, 2021
Related Publication 20230297350A1 · Sep 21, 2023
References Cited (28)
US 11461080B1 · Brossard et al. · 2022 [cited by applicant]
US 20040143823A1 · Wei · 2004 [cited by applicant]
US 20050160100A1 · Eikenhorst et al. · 2005 [cited by applicant]
US 20060020620A1 · Iyer et al. · 2006 [cited by applicant]
US 20100036801A1 · Pirvali et al. · 2010 [cited by applicant]
US 20100313079A1 · Beretta et al. · 2010 [cited by applicant]
US 20120260102A1 · Zaks et al. · 2012 [cited by applicant]
US 20150220597A1 · Simhadri et al. · 2015 [cited by applicant]
US 20180267951A1 · Moah et al. · 2018 [cited by applicant]
US 20190026336A1 · Tian · 2019 [cited by applicant]
US 20190087278A1 · Almog · 2019 [cited by applicant]
US 20200210585A1 · Thom et al. · 2020 [cited by applicant]
US 20210303371A1 · Wang et al. · 2021 [cited by applicant]
US 20220413816A1 · Brossard et al. · 2022 [cited by applicant]
WO WO2013091195A1 · 2013 [cited by applicant]
WO WO2013154398A1 · 2013 [cited by applicant]
“U.S. Appl. No. 17/389,871, Final Office Action mailed Feb. 24, 2022”, 15 pgs. [cited by applicant]
“U.S. Appl. No. 17/389,871, Non-Final Office Action mailed Nov. 3, 2021”, 14 pgs. [cited by applicant]
“U.S. Appl. No. 17/389,871, Notice of Allowance mailed Jun. 9, 2022”, 9 pgs. [cited by applicant]
“U.S. Appl. No. 17/389,871, Response filed Feb. 3, 2022 to Non-Final Office Action mailed Nov. 3, 2021”, 13 pgs. [cited by applicant]
“U.S. Appl. No. 17/389,871, Response filed May 23, 2022 to Final Office Action mailed Feb. 24, 2022”, 10 pgs. [cited by applicant]
“U.S. Appl. No. 17/823,621, Non-Final Office Action mailed Nov. 21, 2022”, 13 pgs. [cited by applicant]
“U.S. Appl. No. 17/823,621, Notice of Allowance mailed Mar. 8, 2023”, 9 pgs. [cited by applicant]
“U.S. Appl. No. 17/823,621, Response filed Feb. 21, 2023 to Non-Final Office Action mailed Nov. 21, 2022”, 8 pgs. [cited by applicant]
Crotty, Andrew, et al., “An Architecture for Compiling UDF-centric Workflow”, [cited by applicant]
Manoharan, Gokul Nath Babu, et al., “Shasta: Interactive Reporting At Scale”, [cited by applicant]
U.S. Appl. No. 17/389,871 U.S. Pat. No. 11,461,080, filed Jul. 30, 2021, Inline Compilation of User Defined Functions. [cited by applicant]
U.S. Appl. No. 17/823,621, filed Aug. 31, 2022, Inline Compilation of User Defined Functions. [cited by applicant]