# US 2019/0377589 A1 · Efficient data decoding using runtime specialization

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0377589 A1
- Document ID: US20190377589A1
- Status: Published application
- Kind: A1
- Application number: 16/006,668
- Filed: 2018-06-12
- Published: 2019-12-12
- Earliest claimed: 2018-06-12
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Bastian Hossbach; Jürgen Christ; Laurent Daynes; Matthias Brantner; Hassan Chafi; Christian Humer
- Web page: https://patentgrep.com/patent/US20190377589A1

## CPC

- G06F 9/45525: {Optimisation or modification within the same instruction set architecture, e.g. HP Dynamo}
- G06F 9/4552: {Involving translation to a different instruction set architecture, e.g. just-in-time translation in a JVM}
- G06F 16/245: Query processing
- G06F 16/38: Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## 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

### Claim 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;
wherein the method is performed by one or more computing devices.

### Claim 2 (depends on 1)

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

### Claim 3 (depends on 1)

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

### Claim 4 (depends on 1)

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.

### Claim 5 (depends on 1)

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.

### Claim 6 (depends on 1)

The method of claim 1, further comprising: in response to executing said decoding machine code to decode a first column of said one or more columns:
identifying a value of the first column that violates an assumption embedded in said decoding machine code;
invalidating said decoding machine code.

### Claim 7 (depends on 6)

The method of claim 6, further comprising: in response to invalidating said decoding machine code, generating new decoding machine code to decode said first column that is not based on an invalid assumption.

### Claim 8 (depends on 1)

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.

### Claim 9 (depends on 1)

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

### Claim 10 (depends on 1)

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

### Claim 11

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.

### Claim 12 (depends on 11)

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

### Claim 13 (depends on 11)

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

### Claim 14 (depends on 11)

The non-transitory computer-readable storage media of claim 11, 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.

### Claim 15 (depends on 11)

The non-transitory computer-readable storage media of claim 11, 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.

### Claim 16 (depends on 11)

The non-transitory computer-readable storage media of claim 11, further comprising: in response to executing said decoding machine code to decode a first column of said one or more columns:
identifying a value of the first column that violates an assumption embedded in said decoding machine code;
invalidating said decoding machine code.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage media of claim 16, further comprising: in response to invalidating said decoding machine code, generating new decoding machine code to decode said first column that is not based on an invalid assumption.

### Claim 18 (depends on 11)

The non-transitory computer-readable storage media of claim 11, 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.

### Claim 19 (depends on 11)

The non-transitory computer-readable storage media of claim 11, further comprising: executing said decoding machine code to decode a column of a second table in the relational database.

### Claim 20 (depends on 11)

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