# US 2022/0284025 A1 · Indexed geospatial predicate search

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

- Number: US 2022/0284025 A1
- Document ID: US20220284025A1
- Status: Published application
- Kind: A1
- Application number: 17/804,248
- Filed: 2022-05-26
- Published: 2022-09-08
- Earliest claimed: 2019-12-26
- Assignees: Snowflake Inc.
- Applicants: Snowflake Inc.
- Inventors: Matthias Carl Adams; Mahmud Allahverdiyev; Ismail Oukid; Peter Popov; Alejandro Salinger
- Web page: https://patentgrep.com/patent/US20220284025A1

## CPC

- G06F 16/24557: {Efficient disk access during query execution}
- G06F 16/29: Geographical information databases
- G06F 16/2272: {Management thereof}
- G06F 16/283: {Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP}
- G06F 16/9035: Filtering based on additional data, e.g. user or group profiles
- G06F 17/18: for evaluating statistical data {, e.g. average values, frequency distributions, probability functions, regression analysis (forecasting specially adapted for a specific administrative, business or logistic context G06Q10/04)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Provided herein are systems and methods for indexed geospatial predicate search. An example method performed by at least one hardware processor includes decoding a query with a geospatial predicate. The geospatial predicate is configured between a geography data column and a constant geography object. The method further includes computing a first covering for a data value of a plurality of data values in the geography data column. The first covering includes a first set of cells in a hierarchical grid representation of a geography. The first set of cells represents a surface of the geography associated with the data value. A second covering is computed for the constant geography object. A determination is made on whether to prune at least one partition of a database organized into a set of partitions and including the geography data column based on a comparison between the first covering and the second covering.

## Claims

### Claim 1

A system comprising:
at least one hardware processor; and
at least one memory storing instructions that cause the at least one hardware processor to perform operations comprising:
decoding a query with a geospatial predicate, the geospatial predicate configured between a geography data column and a constant geography object;
computing a first covering for a data value of a plurality of data values in the geography data column, the first covering including a first set of cells in a hierarchical grid representation of a geography, and the first set of cells representing a surface of the geography associated with the data value;
computing a second covering for the constant geography object; and
determining whether to prune at least one partition of a database including the geography data column based on a comparison between the first covering and the second covering, the database organized into a set of partitions including the at least one partition.

### Claim 2 (depends on 1)

The system of claim 1, wherein the instructions further cause the at least one hardware processor to perform operations comprising:
computing the second covering as a second set of cells in the hierarchical grid representation of the geography, and the second set of cells representing a surface of the geography associated with the constant geography object.

### Claim 3 (depends on 2)

The system of claim 2, wherein the instructions further cause the at least one hardware processor to perform operations comprising:
computing a first extended covering for the data value, the first extended covering comprising the first set of cells and a first set of additional cells that are parent cells of the first set of cells in the hierarchical grid representation.

### Claim 4 (depends on 3)

The system of claim 3, wherein the instructions further cause the at least one hardware processor to perform operations comprising:
computing the first set of additional cells for a pre-configured number of layers in the hierarchical grid representation.

### Claim 5 (depends on 3)

The system of claim 3, wherein the instructions further cause the at least one hardware processor to perform operations comprising:
computing a hash function for each cell of the first set of cells to obtain a first set of hash functions; and
computing a hash function for each cell of the first set of additional cells to obtain a first additional set of hash functions.

### Claim 6 (depends on 5)

The system of claim 5, wherein the instructions further cause the at least one hardware processor to perform operations comprising:
computing the first set of hash functions based on a cell ID for each cell of the first set of cells; and
computing the first additional set of hash functions based on a cell ID for each cell of the first set of additional cells.

### Claim 7 (depends on 5)

The system of claim 5, wherein the instructions further cause the at least one hardware processor to perform operations comprising:
computing a second extended covering for the constant geography object, the second extended covering comprising the second set of cells and a second set of additional cells that are parent cells of the second set of cells in the hierarchical grid representation.

### Claim 8 (depends on 7)

The system of claim 7, wherein the instructions further cause the at least one hardware processor to perform operations comprising:
computing a hash function for each cell of the second set of cells to obtain a second set of hash functions, the second set of hash functions based on a cell ID for each cell of the second set of cells; and
computing a hash function for each cell of the second set of additional cells to obtain a second additional set of hash functions, the second additional set of hash functions based on a cell ID for each cell of the second set of additional cells.

### Claim 9 (depends on 8)

The system of claim 8, wherein the instructions further cause the at least one hardware processor to perform operations comprising:
updating a filter of a search index to include the first set of hash functions and the first additional set of hash functions.

### Claim 10 (depends on 9)

The system of claim 9, wherein the instructions further cause the at least one hardware processor to perform operations comprising:
determining whether to prune the at least one partition of the database based on a comparison between the second set of hash functions and the second additional set of hash functions with the first set of hash functions and the first additional set of hash functions in the filter of the search index.

### Claim 11

A method comprising:
performing by at least one hardware processor operations comprising:
decoding a query with a geospatial predicate, the geospatial predicate configured between a geography data column and a constant geography object;
computing a first covering for a data value of a plurality of data values in the geography data column, the first covering including a first set of cells in a hierarchical grid representation of a geography, and the first set of cells representing a surface of the geography associated with the data value;
computing a second covering for the constant geography object; and
determining whether to prune at least one partition of a database including the geography data column based on a comparison between the first covering and the second covering, the database organized into a set of partitions including the at least one partition.

### Claim 12 (depends on 11)

The method of claim 11, further comprising:
computing the second covering as a second set of cells in the hierarchical grid representation of the geography, and the second set of cells representing a surface of the geography associated with the constant geography object.

### Claim 13 (depends on 12)

The method of claim 12, further comprising:
computing a first extended covering for the data value, the first extended covering comprising the first set of cells and a first set of additional cells that are parent cells of the first set of cells in the hierarchical grid representation.

### Claim 14 (depends on 13)

The method of claim 13, further comprising:
computing the first set of additional cells for a pre-configured number of layers in the hierarchical grid representation.

### Claim 15 (depends on 13)

The method of claim 13, further comprising:
computing a hash function for each cell of the first set of cells to obtain a first set of hash functions; and
computing a hash function for each cell of the first set of additional cells to obtain a first additional set of hash functions.

### Claim 16 (depends on 15)

The method of claim 15, further comprising:
computing the first set of hash functions based on a cell ID for each cell of the first set of cells; and
computing the first additional set of hash functions based on a cell ID for each cell of the first set of additional cells.

### Claim 17 (depends on 15)

The method of claim 15, further comprising:
computing a second extended covering for the constant geography object, the second extended covering comprising the second set of cells and a second set of additional cells that are parent cells of the second set of cells in the hierarchical grid representation.

### Claim 18 (depends on 17)

The method of claim 17, further comprising:
computing a hash function for each cell of the second set of cells to obtain a second set of hash functions, the second set of hash functions based on a cell ID for each cell of the second set of cells; and
computing a hash function for each cell of the second set of additional cells to obtain a second additional set of hash functions, the second additional set of hash functions based on a cell ID for each cell of the second set of additional cells.

### Claim 19 (depends on 18)

The method of claim 18, further comprising:
updating a filter of a search index to include the first set of hash functions and the first additional set of hash functions.

### Claim 20 (depends on 19)

The method of claim 19, further comprising:
determining whether to prune the at least one partition of the database based on a comparison between the second set of hash functions and the second additional set of hash functions with the first set of hash functions and the first additional set of hash functions in the filter of the search index.

### Claim 21

A computer-storage medium comprising instructions that, when executed by one or more processors of a machine, configure the machine to perform operations comprising:
decoding a query with a geospatial predicate, the geospatial predicate configured between a geography data column and a constant geography object;
computing a first covering for a data value of a plurality of data values in the geography data column, the first covering including a first set of cells in a hierarchical grid representation of a geography, and the first set of cells representing a surface of the geography associated with the data value;
computing a second covering for the constant geography object; and
determining whether to prune at least one partition of a database including the geography data column based on a comparison between the first covering and the second covering, the database organized into a set of partitions including the at least one partition.

### Claim 22 (depends on 21)

The computer-storage medium of claim 21, the operations further comprising:
computing the second covering as a second set of cells in the hierarchical grid representation of the geography, and the second set of cells representing a surface of the geography associated with the constant geography object.

### Claim 23 (depends on 22)

The computer-storage medium of claim 22, the operations further comprising:
computing a first extended covering for the data value, the first extended covering comprising the first set of cells and a first set of additional cells that are parent cells of the first set of cells in the hierarchical grid representation.

### Claim 24 (depends on 23)

The computer-storage medium of claim 23, the operations further comprising:
computing the first set of additional cells for a pre-configured number of layers in the hierarchical grid representation.

### Claim 25 (depends on 23)

The computer-storage medium of claim 23, the operations further comprising:
computing a hash function for each cell of the first set of cells to obtain a first set of hash functions; and
computing a hash function for each cell of the first set of additional cells to obtain a first additional set of hash functions.

### Claim 26 (depends on 25)

The computer-storage medium of claim 25, the operations further comprising:
computing the first set of hash functions based on a cell ID for each cell of the first set of cells; and
computing the first additional set of hash functions based on a cell ID for each cell of the first set of additional cells.

### Claim 27 (depends on 25)

The computer-storage medium of claim 25, the operations further comprising:
computing a second extended covering for the constant geography object, the second extended covering comprising the second set of cells and a second set of additional cells that are parent cells of the second set of cells in the hierarchical grid representation.

### Claim 28 (depends on 27)

The computer-storage medium of claim 27, the operations further comprising:
computing a hash function for each cell of the second set of cells to obtain a second set of hash functions, the second set of hash functions based on a cell ID for each cell of the second set of cells; and
computing a hash function for each cell of the second set of additional cells to obtain a second additional set of hash functions, the second additional set of hash functions based on a cell ID for each cell of the second set of additional cells.

### Claim 29 (depends on 28)

The computer-storage medium of claim 28, the operations further comprising:
updating a filter of a search index to include the first set of hash functions and the first additional set of hash functions.

### Claim 30 (depends on 29)

The computer-storage medium of claim 29, the operations further comprising:
determining whether to prune the at least one partition of the database based on a comparison between the second set of hash functions and the second additional set of hash functions with the first set of hash functions and the first additional set of hash functions in the filter of the search index.
