Efficient user-defined function execution and artificial intelligence model invocation
AssigneeHewlett Packard Enterprise Development LP
InventorsRamakumar V. Kosuru, Ronald Tischler, Adam Romayor
Life of this patent
Estimating the term…
Abstract
Efficient implementation of user defined functions (UDFs) is provided herein. Specifically, a database management system (DBMS) compiler may receive a UDF and a query that includes a relational operator and an indication of the UDF that is associated with the relational operator. The compiler may attach the UDF to the relational operator in the query plan, which indicates an execution order of components of the query.
Claims20
A system, comprising:
- a database management system (DBMS) compiler comprising computer-implementable instructions that are implemented by a processor to:
- receive a user-defined function (UDF);
- receive a query comprising:
- a relational operator;
- and
- an indication of the UDF associated with the relational operator;
- compile the query, by attaching an instance of the UDF to the relational operator in a query plan indicating an execution order of components of the query;
- and
- provide the query plan with the attached instance of the UDF to an execution engine to cause a direct implementation of both the instance of the UDF and the relational operator by the execution engine in accordance with the query plan.
A computer-implemented method, comprising:
- receive a user-defined function (UDF);
- receive a query comprising:
- a relational operator;
- and
- an indication of the UDF;
- compile the query, by attaching an instance of the UDF to the relational operator in a query plan indicating an execution order of components of the query;
- and
- provide the query plan with the attached instance of the UDF to a database management system (DBMS) execution engine to cause a direct implementation of both the instance of the UDF and the relational operator by the DBMS execution engine in accordance with the query plan.
A non-transitory, computer-readable medium, comprising computer-readable instructions that, when executed by one or more processors of one or more computers, cause the one or more computers to:
- receive a user-defined function (UDF) configured to return a value based upon operations to data in a database;
- receive a database query comprising:
- a relational operator;
- and
- an indication of the UDF associated with the relational operator in the database query;
- compile the database query, targeting execution of the UDF directly by a database management system (DBMS) execution engine that executes the relational operator, by attaching an instance of the UDF to the relational operator in a query plan indicating an execution order of components of the database query;
- and
- provide the query plan with the attached instance of the UDF to the DBMS execution engine to cause a direct implementation of both the instance of the UDF and the relational operator by the DBMS execution engine in accordance with the query plan.
Dependencies are inferred from the claim text.