# US 2014/0372389 A1 · Data Encoding and Processing Columnar Data

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

- Number: US 2014/0372389 A1
- Document ID: US20140372389A1
- Status: Published application
- Kind: A1
- Application number: 13/918,832
- Filed: 2013-06-14
- Published: 2014-12-18
- Earliest claimed: 2013-06-14
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Ronald J. Barber; Sam S. Lightstone; Guy M. Lohman; Lin Qiao; Viyayshankar Raman; Richard S. Sidle
- Web page: https://patentgrep.com/patent/US20140372389A1

## CPC

- G06F 16/221: {Column-oriented storage; Management thereof}
- G06F 16/1744: {using compression, e.g. sparse files}
- G06F 16/2237: {Vectors, bitmaps or matrices}
- G06F 16/24539: {using cached or materialised query results}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Aspects of the invention are provided for accessing a plurality of data elements. A page of column data is stored in a format that includes compressed and/or non-compressed elements, with the format including a plurality of arrays and a vector. Each of the arrays stores elements with common characteristics, with the vector functioning as a mapping to the stored data elements. The vector is leveraged to identify an array and determine an offset to support access to one or more of the data elements.

## Claims

### Claim 1

A method comprising:
compressing a page of column data and storing the compressed page in a format, the format including a first data array, a second data array, and a vector, the first data array storing data elements having a first common characteristic, the second data array storing data elements having a second common characteristic, the first and second characteristics being different;
indexing the data elements stored in the first and second array into the vector, including mapping the data elements stored in the arrays; and
accessing one or more of the stored data elements, including employing the vector for determining a corresponding offset and array in which the data element is stored.

### Claim 2 (depends on 1)

The method of claim 1, wherein the data stored in the first array and data stored in the second array is selected from the group consisting of: compressed data elements and non-compressed data elements.

### Claim 3 (depends on 2)

The method of claim 2, further comprising aligning unused bits of a length of the compressed data elements in one of the first and second arrays to a boundary, the alignment mitigating bit shifting associated with accessing any one of the stored elements.

### Claim 4 (depends on 3)

The method of claim 3, wherein the boundary is a multiple of a machine word size.

### Claim 5 (depends on 1)

The method of claim 1, further comprising performing vectorized machine instructions simultaneously on all words within each boundary.

### Claim 6 (depends on 1)

The method of claim 1, further comprising determining a data element and position of the data element in one of the first and second arrays, including computing the machine word multiple at which the data element is stored within one of the first and second arrays, and calculating a bit offset of the data element at the computed machine word multiple.

### Claim 7 (depends on 6)

The method of claim 6, wherein computing the machine word multiple includes multiplying a position of the data element by a pre-computed integer modular inverse of a quantity of data elements that fit within each machine word multiple.

### Claim 8 (depends on 1)

The method of claim 1, further comprising accessing at least one data element at a specific position from one of the first and second arrays, including identifying the array, and placings the accessed data elements in the identified array into a new array, wherein an arrangement of the placed data elements is word-aligned.

### Claim 9 (depends on 1)

The method of claim 1, further comprising storing data elements in a third array in the page of column data, the third array containing a plurality of data elements of varying lengths, and indexing the data elements of the third array into the vector.

### Claim 10 (depends on 1)

The method of claim 1, wherein data elements having the first characteristic occupy a first number of bits in the first array, and data elements having the second characteristic occupy a second number of bits in the second array, and wherein determining the offset includes invoking a function customized to the number of bits occupied by each data element in one of the first and second arrays.

### Claim 11

A computer program product for accessing a plurality of data elements, the computer program product comprising a computer readable program storage device having program code embodied therewith, the program code executable by a processor to:
compress a page of column data and store the compressed page in a format, the page format including a first data array, a second data array, and a vector, the first data array storing data elements having a first common characteristic, the second data array storing data elements having a second common characteristic, the first and second characteristics being different;
index the data elements stored in the first and second array into the vector, including mapping the data elements stored in the arrays; and
access one or more of the stored data elements, including employing the vector for determining a corresponding offset and array in which the data element is stored.

### Claim 12 (depends on 11)

The computer program product of claim 11, wherein the data stored in the first array and data stored in the second array is selected from the group consisting of: compressed data elements and non-compressed data elements.

### Claim 13 (depends on 12)

The computer program product of claim 12, further comprising program code to align unused bits of a length of the compressed data elements in one of the first and second arrays to a boundary, the alignment mitigating bit shifting associated with accessing any one of the stored elements.

### Claim 14 (depends on 13)

The computer program product of claim 13, wherein the boundary is a multiple of a machine word size.

### Claim 15 (depends on 11)

The computer program product of claim 11, further comprising program code to perform vectorized machine instructions simultaneously on all words within each boundary.

### Claim 16 (depends on 11)

The computer program product of claim 11, further comprising program code to determine a data element and position of the data element in one of the first and second arrays, including computing the machine word multiple at which the data element is stored within one of the first and second arrays, and calculating a bit offset of the data element at the computed machine word multiple.

### Claim 17 (depends on 16)

The computer program product of claim 16, wherein computing the machine word multiple includes multiplying a position of the data element by a pre-computed integer modular inverse of a quantity of data elements that fit within each machine word multiple.

### Claim 18 (depends on 11)

The computer program product of claim 11, further comprising program code to access at least one data element at a specific position from one of the first and second arrays, including identifying the array, and placing the data elements in the identified array into a new array, wherein an arrangement of the placed data elements is word-aligned.

### Claim 19 (depends on 11)

The computer program product of claim 11, further comprising program code to store data elements in a third array in the page of column data, the third array containing a plurality of data elements of varying lengths, and indexing the data elements of the third array into the vector.

### Claim 20 (depends on 11)

The computer program product of claim 11, wherein data elements having the first characteristic occupy a first number of bits in the first array, and data elements having the second characteristic occupy a second number of bits in the second array, and wherein determining the offset includes invoking a function customized to the number of bits occupied by each data element in one of the first and second arrays.
