IP Library › Granted Patent US 12,443,618
Granted Patent B2
US 12,443,618 · App. 18/787,807 · Granted Oct 14, 2025

Columnar cache in hybrid transactional/analytical processing (HTAP) workloads

Inventors: Mihir Dharamshi (Redmond, WA); Cristian Diaconu (Kirkland, WA); Chen Luo (San Mateo, CA); Andrew McCormick (San Francisco, CA); Corbin McElhanney (San Mateo, CA); Joshua Slocum (Austin, TX); Wumengjian Zhu (Cupertino, CA)
Assignee: Snowflake Inc.
G06F16/254G06F16/116G06F16/172G06F16/2379
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,443,618
App. No.
18/787,807
Granted
Oct 14, 2025
Kind
B2
Abstract

The subject technology receives, by an execution node, blob metadata from a key-value store, the blob metadata including information related to a set of blob files. The subject technology determines, by the execution node using the blob metadata, whether a copy of each of the set of blob files is stored in a local cache of the execution node. The subject technology transforms at least one blob file, retrieved from a blob store, to a second file in a column file format, the at least one blob file being in a first format that is different than the column file format, the transforming comprising at least converting a particular snapshot file from the at least one blob file to a particular set of rowsets and writing the set of rowsets into the second file in the column file format. The subject technology stores the second file in the local cache.

Claims (65)

1. A system comprising:

at least one hardware processor; and

a memory storing instructions that cause the at least one hardware processor to perform operations comprising:

receiving, by an execution node, blob metadata from a key-value store, the blob metadata including information related to a set of blob files;

determining, by the execution node using the blob metadata, whether a copy of each of the set of blob files is stored in a local cache of the execution node;

transforming at least one blob file, retrieved from a blob store, to a second file in a column file format, the at least one blob file being in a first format that is different than the column file format, the transforming comprising at least converting a particular snapshot file from the at least one blob file to a particular set of rowsets and writing the set of rowsets into the second file in the column file format; and

storing the second file in the local cache.

2. The system of claim 1 , wherein the blob metadata includes a snapshot file path, delta file paths, and in-memory mutations,

wherein the copy of each of the set of blob files includes a snapshot file, the snapshot file comprises key-value pairs of a specific key-value storage device version,

wherein determining whether the copy of each of the set of blob files is stored in the local cache is based on finding the snapshot file in the local cache, and the operations further comprise:

merging the transformed at least one blob file based at least in part on a set of visibility rules, the set of visibility rules determining an as-of version of each key of a query, the query including a query range for processing the query.

3. The system of claim 2 , wherein determining the as-of version of each key comprises:

determining that a version of a particular key was written by a current execution of the query.

4. The system of claim 2 , wherein determining the as-of version of each key comprises:

determining that a version of a particular key was written by a finalized statement of a transaction associated with the query; and

determining that no other version of the particular key was written by a finalized statement of the transaction associated with the query with a larger statement number.

5. The system of claim 2 , wherein determining the as-of version of each key comprises:

determining that a version of a particular key was not written by a transaction associated with the query;

determining that a commit timestamp of the version of the particular key is less than or equal to a read timestamp of the query; and

determining that no version of the particular key has a commit timestamp that is less than or equal to the read timestamp of the query and greater than the read timestamp of the query.

6. The system of claim 1 , wherein the blob metadata comprises a snapshot file path, a set of delta file paths, and a set of in-memory mutations.

7. The system of claim 1 , wherein each rowset comprises a set of columns, the set of columns comprises a delete vector column, a stamp column, and a column comprising a pointer to a separate storage space, the separate store space storing a set of values greater than a particular size threshold.

8. The system of claim 1 , wherein the key-value store comprises a distributed database that provides linearizable storage.

9. The system of claim 1 , wherein the operations further comprise:

writing rowsets and schema metadata into a Parquet file;

performing type derivation based on the rowsets; and

performing encoding for each column of data of the Parquet file.

10. The system of claim 1 , wherein the operations further comprise:

reading a snapshot file;

converting the snapshot file into rowsets;

reading a set of delta files;

converting the set of delta files into particular rowsets;

merging the particular rowsets to apply a set of visibility rules;

selecting an as-of version of each key; and

for non-cached files, writing associated rowsets back to a set of Parquet files.

11. A method comprising:

receiving, by an execution node, blob metadata from a key-value store, the blob metadata including information related to a set of blob files;

determining, by the execution node using the blob metadata, whether a copy of each of the set of blob files is stored in a local cache of the execution node;

transforming at least one blob file, retrieved from a blob store, to a second file in a column file format, the at least one blob file being in a first format that is different than the column file format, the transforming comprising at least converting a particular snapshot file from the at least one blob file to a particular set of rowsets and writing the set of rowsets into the second file in the column file format; and

storing the second file in the local cache.

12. The method of claim 11 , wherein the blob metadata includes a snapshot file path, delta file paths, and in-memory mutations,

wherein the copy of each of the set of blob files includes a snapshot file, the snapshot file comprises key-value pairs of a specific key-value storage device version,

wherein determining whether the copy of each of the set of blob files is stored in the local cache is based on finding the snapshot file in the local cache, and further comprising:

merging the transformed at least one blob file based at least in part on a set of visibility rules, the set of visibility rules determining an as-of version of each key of a query, the query including a query range for processing the query.

13. The method of claim 12 , wherein determining the as-of version of each key comprises:

determining that a version of a particular key was written by a current execution of the query.

14. The method of claim 12 , wherein determining the as-of version of each key comprises:

determining that a version of a particular key was written by a finalized statement of a transaction associated with the query; and

determining that no other version of the particular key was written by a finalized statement of the transaction associated with the query with a larger statement number.

15. The method of claim 12 , wherein determining the as-of version of each key comprises:

determining that a version of a particular key was not written by a transaction associated with the query;

determining that a commit timestamp of the version of the particular key is less than or equal to a read timestamp of the query; and

determining that no version of the particular key has a commit timestamp that is less than or equal to the read timestamp of the query and greater than the read timestamp of the query.

16. The method of claim 11 , wherein the blob metadata comprises a snapshot file path, a set of delta file paths, and a set of in-memory mutations.

17. The method of claim 11 , wherein the local cache is provided by an execution node.

18. The method of claim 11 , wherein the key-value store comprises a distributed database that provides linearizable storage.

19. The method of claim 11 , further comprising:

writing rowsets and schema metadata into a Parquet file;

performing type derivation based on the rowsets; and

performing encoding for each column of data of the Parquet file.

20. A non-transitory computer-storage medium comprising instructions that, when executed by one or more processors of a machine, configure the machine to perform operations comprising:

receiving, by an execution node, blob metadata from a key-value store, the blob metadata including information related to a set of blob files;

determining, by the execution node using the blob metadata, whether a copy of each of the set of blob files is stored in a local cache of the execution node;

transforming at least one blob file, retrieved from a blob store, to a second file in a column file format, the at least one blob file being in a first format that is different than the column file format, the transforming comprising at least converting a particular snapshot file from the at least one blob file to a particular set of rowsets and writing the set of rowsets into the second file in the column file format; and

storing the second file in the local cache.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 29, 2024
From: DHARAMSHI, MIHIR; DIACONU, CRISTIAN; LUO, CHEN; MCCORMICK, ANDREW; MCELHANNEY, CORBIN; SLOCUM, JOSHUA; ZHU, WUMENGJIAN
To: SNOWFLAKE INC.
Reel/Frame 068115/0779 →
Continuity (2)
Continuation 18455229 · Aug 24, 2023
Related Publication 20250068640A1 · Feb 27, 2025
References Cited (24)
US 12086154B1 · Dharamshi et al. · 2024 [cited by applicant]
US 20090187610A1 · Guo · 2009 [cited by applicant]
US 20130018903A1 · Taranov · 2013 [cited by applicant]
US 20150350316A1 · Calder et al. · 2015 [cited by applicant]
US 20160292178A1 · Manville · 2016 [cited by examiner]
US 20210286806A1 · Ahmadi et al. · 2021 [cited by applicant]
US 20220318223A1 · Ahluwalia et al. · 2022 [cited by applicant]
US 20220382758A1 · Schreter · 2022 [cited by applicant]
US 20230141891A1 · Huang et al. · 2023 [cited by applicant]
US 20230141902A1 · Ma et al. · 2023 [cited by applicant]
US 20230259521A1 · Haelen et al. · 2023 [cited by applicant]
US 20230336592A1 · Narayanaswamy et al. · 2023 [cited by applicant]
US 20240111743A1 · Lewis et al. · 2024 [cited by applicant]
US 20240168929A1 · Sigoure et al. · 2024 [cited by applicant]
US 20240378186A1 · Paulraj et al. · 2024 [cited by applicant]
US 20250068605A1 · Diaconu et al. · 2025 [cited by applicant]
“U.S. Appl. No. 18/455,229, Final Office Action mailed Mar. 5, 2024”, 29 pgs. [cited by applicant]
“U.S. Appl. No. 18/455,229, Non Final Office Action mailed Nov. 16, 2023”, 30 pgs. [cited by applicant]
“U.S. Appl. No. 18/455,229, Notice of Allowance mailed Jun. 3, 2024”, 8 pgs. [cited by applicant]
“U.S. Appl. No. 18/455,229, Response filed Jan. 30, 2024 to Non Final Office Action mailed Nov. 16, 2023”, 12 pgs. [cited by applicant]
“U.S. Appl. No. 18/455,229, Response filed May 6, 2024 to Final Office Action mailed Mar. 5, 2024”, 12 pgs. [cited by applicant]
“U.S. Appl. No. 18/499,762, Non Final Office Action mailed Dec. 16, 2024”, 29 pages. [cited by applicant]
“U.S. Appl. No. 18/499,762, Examiner Interview Summary mailed Mar. 3, 2025”, 2 pages. [cited by applicant]
“U.S. Appl. No. 18/499,762, Response filed Mar. 10, 2025 to Non Final Office Action mailed Dec. 16, 2024”, 12 pages. [cited by applicant]