Transparent user-defined function (UDF) optimization

US11023460B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11023460-B2
Application numberUS-201715852559-A
CountryUS
Kind codeB2
Filing dateDec 22, 2017
Priority dateDec 22, 2017
Publication dateJun 1, 2021
Grant dateJun 1, 2021

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A User-Defined Function (UDF) provided by a user and accessed through a user query is identified. A wrapper for the UDF is generated. The wrapper represents a customized instance of the UDF. The wrapper, during execution, selectively calls the UDF provided by the user. Any query that references the UDF is rewritten to process the wrapper instead of the UDF.

First claim

Opening claim text (preview).

The invention claimed is: 1. A method, comprising: identifying a source code for a User-Defined Function (UDF) being created by a user in a Data Definition Language (DDL) statement; generating a new source code for the UDF; creating a wrapper source code representing an instance of the new source code that selectively calls the UDF; and processing an executable version of the instance when the UDF is called in a query, further including rewriting the query to call the instance instead of the UDF and replacing a GROUP BY clause in the query with a PARTITION BY clause. 2. The method of claim 1 , wherein identifying further includes identifying the UDF as an aggregate data function provided by the user in a CREATE clause of the DDL statement. 3. The method of claim 2 , wherein generating further includes generating the new source code as an aggregate table operator. 4. The method of claim 1 , wherein creating further includes changing a manner in which input data is passed to the UDF is processed within the wrapper source code. 5. The method of claim 4 , wherein changing further includes providing batching instructions within the wrapper source code to batch the input data before the wrapper code calls the UDF. 6. The method of claim 4 , wherein changing further includes providing buffering instructions within the wrapper source code for allocating at least one memory buffer for holding the input data before the wrapper code calls the UDF and for holding results produced by the calls to the UDF. 7. The method of claim 1 , wherein creating further includes rewriting the DDL statement to replace the UDF with the instance. 8. The method of claim 1 further comprising, dynamically processing the method within a database parser that interprets the query and generates executable query instructions for the query. 9. The method of claim 8 , wherein dynamically processing further includes transparently performing the method in a manner that the user is unaware of and where the UDF, the DDL statement, and the query remain unchanged from the perspective of the user. 10. A method, comprising: transparently generating a wrapper representing an instance of a User-Defined Function (UDF) in response to the User-Defined Function (UDF) being registered; registering the instance as a replacement for the UDF; and calling the instance when a query references the UDF, further including transparently rewriting the query to call the instance and replacing a GROUP BY clause that performs aggregation with a PARTITION by clause that performs an equivalent aggregation within the query. 11. The method of claim 10 , wherein transparently generating further includes altering how input data is passed to the UDF within the wrapper. 12. The method of claim 11 , wherein altering further includes providing a batching mechanism for batching the input data before passing to the UDF within the wrapper. 13. The method of claim 10 , wherein registering further includes transparently rewriting a Data Definition Language (DDL) statement that registered the UDF to replace the UDF with the instance. 14. The method of claim 10 further comprising, processing the method within a parser/optimizer of a database. 15. A system, comprising: a data warehouse including: a query parser; and a User-Defined Function (UDF) Wrapper; wherein the query parser is configured to i) execute on a hardware processor of a network computing device, ii) generate the UDF wrapper as an equivalent instance of a UDF in response to the UDF registered by a user with the data warehouse, and iii) provide instructions that processes the equivalent instance in place of the UDF when the UDF is called within a query; and wherein the query parser is further configured in ii) to change a mechanism in which input data is passed to the UDF within the UDF wrapper, register the equivalent instance with the data warehouse as a replacement to the UDF, and replace a GROUP BY clause that performs data aggregation when the query is processed with a PARTITION BY clause within the query, wherein the PARTITION BY clause performs an equivalent data aggregation as the data aggregation.

Assignees

Inventors

Classifications

  • G06F8/51Primary

    Source to source · CPC title

  • Grouping and aggregation · CPC title

  • Parsing · CPC title

  • for particular applications; for extensibility, e.g. user defined types · CPC title

  • User-Defined Types; Storage management thereof · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11023460B2 cover?
A User-Defined Function (UDF) provided by a user and accessed through a user query is identified. A wrapper for the UDF is generated. The wrapper represents a customized instance of the UDF. The wrapper, during execution, selectively calls the UDF provided by the user. Any query that references the UDF is rewritten to process the wrapper instead of the UDF.
Who is the assignee on this patent?
Yuan Heng, Wu Judy, Long Yu, and 2 more
What technology area does this patent fall under?
Primary CPC classification G06F8/51. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Jun 01 2021 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 5 related publications on this page (citations in our corpus or others sharing the same primary CPC).