IP Library Granted Patent US 12,153,558
Granted Patent B1
US 12,153,558 · App. 18/162,093 · Granted Nov 26, 2024

Hash based rollup with passthrough

Inventors: Alexander Behm (Lafayette, CA); Ankur Dave (Berkeley, CA)
Assignee: Databricks, Inc.
G06F16/2255G06F16/134G06F16/2272G06F16/244G06F16/24556G06F16/285
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 12,153,558
App. No.
18/162,093
Granted
Nov 26, 2024
Kind
B1
Abstract

A system includes a plurality of computing units. A first computing unit of the plurality of computing units comprises: a communication interface configured to receive an indication to roll up data in a data table; and a processor coupled to the communication interface and configured to: build a preaggregation hash table based at least in part on a set of columns and the data table by aggregating input rows of the data table; for each preaggregated hash table entry of the preaggregated hash table: provide the preaggregated hash table entry to a second computing unit of the plurality of computing units based at least in part on a distribution hash value; receive a set of received entries from computing units of the plurality of computing units; and build an aggregation hash table based at least in part on the set of received entries by aggregating the set of received entries.

Claims (73)

1. A method comprising:

receiving a request to roll up data in a data table, the request specifying a set of columns;

repeating while the set of columns is not empty:

building a preaggregation hash table based at least in part on the set of columns of the data table,

creating a preaggregated hash table by aggregating the preaggregation hash table, and

removing a column from the set of columns;

creating an aggregated hash table by processing entries of the preaggregated hash table using a plurality of computing units; and

storing the aggregated hash table.

2. The method of claim 1 , further comprising:

determining an aggregation ratio while aggregating the preaggregation hash table; and

in response to determining that the aggregation ratio is below a threshold, stopping aggregating the preaggregation hash table.

3. The method of claim 1 , wherein building the preaggregation hash table based at least in part on a set of columns and the data table comprises:

for each data table row:

determining a key based at least in part on data table row data; and

responsive to determining that the key does not already exist in the preaggregation hash table, creating a new entry comprising a new entry key and a new entry value, wherein the key is the new entry key and the data table row data is the new entry value.

4. The method of claim 1 , wherein creating the preaggregated hash table comprises:

responsive to determining that a hash table entry of the preaggregation hash table comprises multiple data sets:

aggregating the multiple data sets to create a single data set entry; and

replacing an entry value of the hash table entry with the single data set entry.

5. The method of claim 4 , wherein aggregating the multiple data sets to create a single data set entry comprises aggregating data associated with a column indicated for aggregation using an aggregation function.

6. The method of claim 5 , wherein the aggregation function comprises exact variants, approximate variants, and distinct variants of functions including count, sum, average, maximum, minimum, standard deviation, variance, and skewness.

7. The method of claim 1 , further comprising:

determining a final aggregation value by aggregating data of the aggregated hash table associated with a column indicated for aggregation using an aggregation function; and

storing the final aggregation value in a storage system.

8. A computing system comprising:

one or more computer processors; and

one or more non-transitory computer-readable mediums storing instructions that, when executed by the one or more computer processors, cause the computing system to:

receive a request to roll up data in a data table, the request specifying a set of columns;

repeat while the set of columns is not empty:

build a preaggregation hash table based at least in part on the set of columns of the data table,

create a preaggregated hash table by aggregating the preaggregation hash table, and

remove a column from the set of columns;

create an aggregated hash table by processing entries of the preaggregated hash table using a plurality of computing units; and

store the aggregated hash table.

9. The computing system of claim 8 , wherein the instructions further cause the one or more computer processors to:

determine an aggregation ratio while aggregating the preaggregation hash table; and

in response to determining that the aggregation ratio is below a threshold, stop aggregating the preaggregation hash table.

10. The computing system of claim 8 , wherein instructions for building the preaggregation hash table based at least in part on a set of columns and the data table cause the one or more computer processors to:

for each data table row:

determine a key based at least in part on data table row data; and

responsive to determining that the key does not already exist in the preaggregation hash table, create a new entry comprising a new entry key and a new entry value, wherein the key is the new entry key and the data table row data is the new entry value.

11. The computing system of claim 8 , wherein instructions for creating the preaggregated hash table cause the one or more computer processors to:

responsive to determining that a hash table entry of the preaggregation hash table comprises multiple data sets:

aggregate the multiple data sets to create a single data set entry; and

replace an entry value of the hash table entry with the single data set entry.

12. The computing system of claim 11 , wherein aggregating the multiple data sets to create a single data set entry comprises aggregating data associated with a column indicated for aggregation using an aggregation function.

13. The computing system of claim 12 , wherein the aggregation function comprises exact variants, approximate variants, and distinct variants of functions including count, sum, average, maximum, minimum, standard deviation, variance, and skewness.

14. The computing system of claim 8 , wherein the instructions further cause the one or more computer processors to:

determine a final aggregation value by aggregating data of the aggregated hash table associated with a column indicated for aggregation using an aggregation function; and

store the final aggregation value in a storage system.

15. A non-transitory computer-readable medium storing instructions that, when executed by one or more computer processors of a computing system, cause the computing system to:

receive a request to roll up data in a data table, the request specifying a set of columns;

repeat while the set of columns is not empty:

build a preaggregation hash table based at least in part on the set of columns of the data table,

create a preaggregated hash table by aggregating the preaggregation hash table, and

remove a column from the set of columns;

create an aggregated hash table by processing entries of the preaggregated hash table using a plurality of computing units; and

store the aggregated hash table.

16. The non-transitory computer-readable medium of claim 15 , wherein the instructions further cause the one or more computer processors to perform operations comprising:

determine an aggregation ratio while aggregating the preaggregation hash table; and

in response to determining that the aggregation ratio is below a threshold, stop aggregating the preaggregation hash table.

17. The non-transitory computer-readable medium of claim 15 , wherein instructions for building the preaggregation hash table based at least in part on a set of columns and the data table cause the one or more computer processors to perform operations comprising:

for each data table row:

determine a key based at least in part on data table row data; and

responsive to determining that the key does not already exist in the preaggregation hash table, create a new entry comprising a new entry key and a new entry value, wherein the key is the new entry key and the data table row data is the new entry value.

18. The non-transitory computer-readable medium of claim 15 , wherein instructions for creating the preaggregated hash table cause the one or more computer processors to perform operations comprising:

responsive to determining that a hash table entry of the preaggregation hash table comprises multiple data sets:

aggregate the multiple data sets to create a single data set entry; and

replace replacing an entry value of the hash table entry with the single data set entry.

19. The non-transitory computer-readable medium of claim 18 , wherein instructions for aggregating the multiple data sets to create a single data set entry comprises aggregating data associated with a column indicated for aggregation using an aggregation function.

20. The non-transitory computer-readable medium of claim 15 , wherein the instructions further cause the one or more computer processors to perform operations comprising:

determine a final aggregation value by aggregating data of the aggregated hash table associated with a column indicated for aggregation using an aggregation function; and

store the final aggregation value in a storage system.

Assignments (2)
SECURITY INTEREST Recorded Jan 6, 2025
From: DATABRICKS, INC.
To: JPMORGAN CHASE BANK, N.A., AS COLLATERAL AGENT
Reel/Frame 069825/0419 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 27, 2023
From: BEHM, ALEXANDER; DAVE, ANKUR
To: DATABRICKS, INC.
Reel/Frame 064402/0291 →
Continuity (1)
Continuation 17099467 · Nov 16, 2020