Generating a producer-driven execution plan from a consumer-driven iterator-based execution plan
US-2017060948-A1 · Mar 2, 2017 · US
US11157491B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-11157491-B2 |
| Application number | US-201816164682-A |
| Country | US |
| Kind code | B2 |
| Filing date | Oct 18, 2018 |
| Priority date | Oct 18, 2018 |
| Publication date | Oct 26, 2021 |
| Grant date | Oct 26, 2021 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
Disclosed embodiments include generating code from a database query and providing a framework to develop complex data structures and the functions that access those data structures outside of the generated code to access the complex data structures. These data structure functions can be precompiled in order to save compilation time at query runtime, and linked to the generated code in a way that the framework can still inline function calls and apply various optimizations on the linked code.
Opening claim text (preview).
What is claimed is: 1. A method comprising: receiving a database query expressed in a database query language; and executing the database query to produce a query result, including: generating source code from the database query comprising statements expressed in a programming language that is not a machine level programming language; generating first intermediate code from the source code comprising statements expressed in an intermediate representation that is not a machine level programming language; linking function calls made in the first intermediate code to one or more functions stored in a library of functions to produce second intermediate code, each of the one or more functions comprising statements expressed in the intermediate representation, wherein the one or more functions are previously compiled from source code prior to receiving the database query, wherein the linking includes copying the one or more functions from the library of functions into the first intermediate code to produce the second intermediate code; transforming the second intermediate code to produce transformed intermediate code, said transforming including replacing at least one function call with statements that comprise a function called by the at least one function call to perform the one or more functions without invoking the one or more functions from the library of functions, wherein the programming language is a procedural source code to produce the first intermediate code; and generating machine executable code from the transformed intermediate code and executing the machine executable code to produce the query result. 2. The method of claim 1 , further comprising receiving the one or more functions and storing them in the library of functions, wherein the receiving and storing of the one or more functions occur separately and independently of receiving the database query and processing the database query. 3. The method of claim 1 , wherein the intermediate representation is independent of processor architecture, wherein the machine executable code is specific to a processor architecture. 4. The method of claim 1 , further comprising generating an execution plan for the database query and generating the source code based on the execution plan. 5. A non-transitory computer-readable storage medium having stored thereon computer executable instructions, which when executed by a computer device, cause the computer device to: receive a database query expressed in a database query language; and execute the database query to produce a query result, including: generating source code from the database query comprising statements expressed in a programming language that is not a machine level programming language; generating first intermediate code from the source code comprising statements expressed in an intermediate representation that is not a machine level programming language; linking function calls made in the first intermediate code to one or more functions stored in a library of functions to produce second intermediate code, each of the one or more functions comprising statements expressed in the intermediate representation, wherein the one or more functions are previously compiled from source code prior to receiving the database query, wherein the linking includes copying the one or more functions from the library of functions into the first intermediate code to produce the second intermediate code; transforming the second intermediate code to produce transformed intermediate code, said transforming including replacing at least one function call with statements that comprise a function called by the at least one function call to perform the one or more functions without invoking the one or more functions from the library of functions, wherein the programming language is a procedural language, wherein generating the first intermediate code includes compiling the source code to produce the first intermediate code; and generating machine executable code from the transformed intermediate code and executing the machine executable code to produce the query result. 6. The non-transitory computer-readable storage medium of claim 5 , wherein the intermediate representation is independent of processor architecture, wherein the machine executable code is specific to a processor architecture. 7. An apparatus comprising: one or more computer processors; and a computer-readable storage medium comprising instructions for controlling the one or more computer processors to be operable to: receive a database query expressed in a database query language; and execute the database query to produce a query result, including: generating source code from the database query comprising statements expressed in a programming language that is not a machine level programming language; generating first intermediate code from the source code comprising statements expressed in an intermediate representation that is not a machine level programming language; linking function calls made in the first intermediate code to one or more functions stored in a library of functions to produce second intermediate code, each of the one or more functions comprising statements expressed in the intermediate representation, wherein the one or more functions are previously compiled from source code prior to receiving the database query, wherein the linking includes copying the one or more functions from the library of functions into the first intermediate code to produce the second intermediate code; transforming the second intermediate code to produce transformed intermediate code, said transforming including replacing at least one function call with statements that comprise a function called by the at least one function call to perform the one or more functions without invoking the one or more functions from the library of functions, wherein the programming language is a procedural language, wherein generating the first intermediate code includes compiling the source code to produce the first intermediate code; and generating machine executable code from the transformed intermediate code and executing the machine executable code to produce the query result. 8. The apparatus of claim 7 , wherein the intermediate representation is independent of processor architecture, wherein the machine executable code is specific to a processor architecture.
for particular applications; for extensibility, e.g. user defined types · CPC title
Compilation · CPC title
Embedded query languages · CPC title
Optimisation · CPC title
Inlining · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.