IP Library Granted Patent US 10,684,873
Granted Patent B2
US 10,684,873 · App. 16/006,668 · Granted Jun 16, 2020

Efficient data decoding using runtime specialization

Inventors: Bastian Hossbach (Thalwil, CH); Jürgen Christ (Korntal-Münchingen, DE); Laurent Daynes (Grenoble, FR); Matthias Brantner (Sunnyvale, CA); Hassan Chafi (San Mateo, CA); Christian Humer (Zurich, CH)
Assignee: ORACLE INTERNATIONAL CORPORATION
G06F9/45525G06F16/245G06F16/38
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 10,684,873
App. No.
16/006,668
Granted
Jun 16, 2020
Kind
B2
Abstract

Computer-implemented techniques described herein provide efficient data decoding using runtime specialization. In an embodiment, a method comprises a virtual machine executing a body of code of a dynamically typed language, wherein executing the body of code includes: querying a relational database, and in response to the query, receiving table metadata indicating data types of one or more columns of a first table in the relational database. In response to receiving the table metadata: for a first column of the one or more columns, generating decoding machine code to decode the first column based on the data type of the first column, and executing the decoding machine code to decode the first column of the one or more columns.

Claims (39)

1. A method comprising:

executing a body of code of a dynamically typed language, wherein executing said body of code includes:

querying against a relational database;

in response to the query, receiving table metadata, the table metadata indicating data types of one or more columns of a first table in the relational database;

in response to receiving the table metadata:

for a first column of the one or more columns, a Just-In-Time (JIT) compiler generating decoding machine code to decode said first column based on a data type of said first column that is indicated by said table metadata;

executing said decoding machine code to decode said first column of said one or more columns;

in response to executing said decoding machine code to decode said first column of said one or more columns:

identifying a value of the first column that violates an assumption that is about the values in the first column and is embedded in said decoding machine code;

invalidating said decoding machine code;

generating new decoding machine code to decode said first column that is not based on the assumption;

wherein the method is performed by one or more computing devices.

2. The method of claim 1 , wherein said body of code is executed by a virtual machine.

3. The method of claim 1 , wherein said decoding machine code is generated and executed during runtime.

4. The method of claim 1 , wherein the table metadata includes information indicating whether there can be NULL values in a column, a value range of a column, a character set of a column, and a statically known size of database types.

5. The method of claim 1 , wherein the table metadata includes information indicating whether there can be NULL values in a column;

wherein generating decoding machine code to decode said first column is based on the data type of said first column and the information indicating whether there can be NULL values in said first column.

6. The method of claim 1 , further comprising: executing said decoding machine code to decode a second column of said one or more columns, wherein the second column has the same data type as the first column.

7. The method of claim 1 , further comprising: executing said decoding machine code to decode a column of a second table in the relational database.

8. The method of claim 1 , wherein said decoding machine code is in-lined into the body of code of the dynamically typed language.

9. One or more non-transitory computer-readable storage media storing instructions that, when executed by one or more processors, cause:

executing a body of code of a dynamically typed language, wherein executing said body of code includes:

querying against a relational database;

in response to the query, receiving table metadata, the table metadata indicating data types of one or more columns of a first table in the relational database;

in response to receiving the table metadata:

for a first column of the one or more columns, a Just-In-Time (JIT) compiler generating decoding machine code to decode said first column based on a data type of said first column that is indicated by said table metadata;

executing said decoding machine code to decode said first column of said one or more columns;

in response to executing said decoding machine code to decode said first column of said one or more columns:

identifying a value of the first column that violates an assumption that is about the values in the first column and is embedded in said decoding machine code;

invalidating said decoding machine code;

generating new decoding machine code to decode said first column that is not based on the assumption.

10. The non-transitory computer-readable storage media of claim 9 , wherein said body of code is executed by a virtual machine.

11. The non-transitory computer-readable storage media of claim 9 , wherein said decoding machine code is generated and executed during runtime.

12. The non-transitory computer-readable storage media of claim 9 , wherein the table metadata includes information indicating whether there can be NULL values in a column, a value range of a column, a character set of a column, and a statically known size of database types.

13. The non-transitory computer-readable storage media of claim 9 , wherein the table metadata includes information indicating whether there can be NULL values in a column;

wherein generating decoding machine code to decode said first column is based on the data type of said first column and the information indicating whether there can be NULL values in said first column.

14. The non-transitory computer-readable storage media of claim 9 , the instructions including instructions that, when execusted by said one or more processors, cause executing said decoding machine code to decode a second column of said one or more columns, wherein the second column has the same data type as the first column.

15. The non-transitory computer-readable storage media of claim 9 , the instructions including instructions that, when execusted by said one or more processors, cause executing said decoding machine code to decode a column of a second table in the relational database.

16. The non-transitory computer-readable storage media of claim 9 , wherein said decoding machine code is in-lined into the body of code of the dynamically typed language.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 18, 2020
From: HOSSBACH, BASTIAN; CHRIST, JÜRGEN; DAYNES, LAURENT; BRANTNER, MATTHIAS; CHAFI, HASSAN; HUMER, CHRISTIAN
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 052156/0674 →
Continuity (1)
Related Publication 20190377589A1 · Dec 12, 2019