IP Library › Granted Patent US 11,243,958
Granted Patent B2
US 11,243,958 · App. 15/058,590 · Granted Feb 8, 2022

Implementing contract-based polymorphic and parallelizable SQL user-defined scalar and aggregate functions

Inventors: Xin Tang (Dayton, OH); James Shau (Dayton, OH); Robert Wehrmeister (Austin, TX); Daniel T. Yu (Dayton, OH)
Assignee: Teradata US, Inc.
G06F16/24575G06F16/2458
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 11,243,958
App. No.
15/058,590
Granted
Feb 8, 2022
Kind
B2
Abstract

Disclosed are systems and methods for implementing contract-based polymorphic and parallelizable user-defined scalar and aggregate functions. The systems and methods can include receiving a query including a plurality of user-defined functions, parsing the query into a plurality of nodes (e.g., basic operation unit or atomic operator), generating an execution plan that minimizes data transfer between the plurality of nodes, and executing the plan in a distributed environment. Each of the plurality of user-defined functions can correspond to one of a plurality of nodes.

Claims (29)

1. A method comprising:

receiving, at a computing device including a processor, a query including a plurality of dynamically polymorphic user-defined functions, the plurality of dynamically polymorphic user defined functions including a user-defined scalar function and a user-defined aggregate function and each of the plurality of dynamically polymorphic user-defined functions includes a runtime contract that specifies acceptable input types and corresponding output types for each of the user-defined functions;

parsing, by the computing device, the query into a plurality of nodes, each of the plurality of user-defined functions corresponding to one of a plurality of nodes;

determining, by the computing device, input and output schemas for said plurality of dynamically polymorphic user-defined functions in accordance with said runtime contracts;

generating, by the computing device, an execution plan that minimizes data transfer between the plurality of nodes; and

storing, by the computing device, the execution plan to a memory.

2. The method of claim 1 , wherein generating the execution plan includes applying heuristic rules to determine runtimes and the data transfer between a plurality of execution plan fragments.

3. The method of claim 1 , wherein generating the execution plan includes combining two of the dynamically polymorphic user-defined functions into one operator that can be executed in one local path of data in a worker node.

4. The method of claim 1 , further comprising executing a component of the execution plan in a corresponding node of the plurality of nodes.

5. A system comprising:

a processor; and

a memory that stores instructions that, when execute by the processor, cause the processor to perform operations comprising:

receiving a query including a plurality of dynamically polymorphic user-defined functions, the plurality of dynamically polymorphic user defined functions including a user-defined scalar function and a user-defined aggregate function and each of the plurality of dynamically polymorphic user-defined functions includes a runtime contract that specifies acceptable input types and corresponding output types for each of the user-defined functions,

parsing the query into a plurality of nodes, each of the plurality of user-defined functions corresponding to one of a plurality of nodes,

determining input and output schemas for said plurality of dynamically polymorphic user-defined functions in accordance with said runtime contracts;

generating an execution plan that minimizes data transfer between the plurality of nodes, and

storing the execution plan to the memory.

6. The system of claim 5 , wherein generating the execution plan includes applying heuristic rules to determine runtimes and the data transfer between a plurality of execution plan fragments.

7. The system of claim 5 , wherein generating the execution plan includes combining two of the dynamically polymorphic user-defined functions into one operator that can be executed in one local path of data in a worker node.

8. The system of claim 5 , wherein the operations further comprise executing a component of the execution plan in a corresponding node of the plurality of nodes.

9. A non-transitory computer-readable medium comprising instructions that, when executed by a processor, cause the processor to perform operations comprising:

receiving a query including a plurality of dynamically polymorphic user-defined functions, the plurality of dynamically polymorphic user defined functions including a user-defined scalar function and a user-defined aggregate function and each of the plurality of dynamically polymorphic user-defined functions includes a runtime contract that specifies acceptable input types and corresponding output types for each of the user-defined functions,

parsing the query into a plurality of nodes, each of the plurality of user-defined functions corresponding to one of a plurality of nodes,

determining input and output schemas for said plurality of dynamically polymorphic user-defined functions in accordance with said runtime contracts;

generating an execution plan that minimizes data transfer between the plurality of nodes, and

storing the execution plan to the memory.

10. The non-transitory computer-readable medium of claim 9 , wherein generating the execution plan includes applying heuristic rules to determine runtimes and the data transfer between a plurality of execution plan fragments.

11. The non-transitory computer-readable medium of claim 9 , wherein generating the execution plan includes combining two of the dynamically polymorphic user-defined functions into one operator that can be executed in one local path in a worker node.

12. The non-transitory computer-readable medium of claim 9 , wherein the operations further comprise executing a component of the execution plan in a corresponding node of the plurality of nodes.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 23, 2021
From: TERADATA CORPORATION
To: TERADATA US, INC.
Reel/Frame 057259/0246 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 7, 2021
From: TANG, XIN
To: TERADATA CORPORATION
Reel/Frame 056773/0455 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 28, 2020
From: SHAU, JAMES; WEHRMEISTER, ROBERT MATTHEW; YU, DANIEL T.
To: TERADATA US, INC.
Reel/Frame 054189/0912 →
Continuity (2)
Provisional Application 62273984 · Dec 31, 2015
Related Publication 20170193054A1 · Jul 6, 2017