# US 2026/0099473 A1 · Efficient implementation of bitsets for dml statements

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

- Number: US 2026/0099473 A1
- Document ID: US20260099473A1
- Status: Published application
- Kind: A1
- Application number: 19/043,084
- Filed: 2025-01-31
- Published: 2026-04-09
- Earliest claimed: 2024-10-04
- Assignees: Snowflake Inc.
- Applicants: Snowflake Inc.
- Inventors: Hossein Ahmadi; Benoit Dageville; Yi Fang; Benjamin Farr Hannel; Fabian Hüske; Valeri Kim; Xinglian Liu; Noble Mushtak; Dzmitry Pauliukevich; Lukas Simon Probst; Eric Robinson; Ankur Sharma; Ryan Michael Thomas Shelly; Lars Volker; Jiaqi Yan; Yizhi Zhu
- Web page: https://patentgrep.com/patent/US20260099473A1

## CPC

- G06F 16/213: {with details for schema evolution support}
- G06F 16/219: {Managing data history or versioning (querying versioned data G06F16/2474; querying temporal data G06F16/2477)}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/2455: Query execution
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The subject technology receives a first query, the first query comprising a first set of statements, the first set of statements including at least a first statement for performing a first Data Manipulation Language (DML) operation on a first table, the first table included in a source file. The subject technology executes the first query, the executing including determining whether to perform a copy-on-write (CoW) process. subject technology performs a CoW fallback process. The subject technology performs the copy-on-write process for the first query based on a result of the CoW fallback process.

## 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:
receiving a first query, the first query comprising a first set of statements, the first set of statements including at least a first statement for performing a first Data Manipulation Language (DML) operation on a first table, the first table included in a source file;
executing the first query, the executing including determining whether to perform a copy-on-write (CoW) process, the determining comprising at least one of:
performing a CoW fallback process, the CoW fallback process comprising:
determining whether a ratio of a first number of deleted rows in a delta file over a second number of rows in the source file is greater than a threshold number of rows;
determining whether a first file size of the source file is smaller than a first threshold file size value;
determining whether the DML operation, when executing, is increasing a row size of the first table or a file size of the source file over a particular threshold size value; or
determining whether a resulting file size for a CoW file is smaller than a threshold CoW file size value; and
performing the copy-on-write process for the first query based on a result of the CoW fallback process.

### Claim 2 (depends on 1)

The system of claim 1, wherein a scanback operator determines whether the ratio of the first number of deleted rows in the delta file over the second number of rows in the source file and determines whether the first file size of the source file is smaller than the first threshold file size value.

### Claim 3 (depends on 1)

The system of claim 1, wherein performing the CoW fallback process further comprises:
determining whether the source file is a different file type than a micro-partition file.

### Claim 4 (depends on 1)

The system of claim 1, wherein performing the CoW fallback process further comprises:
determining whether a CoW decision override has been set for executing the first query.

### Claim 5 (depends on 1)

The system of claim 1, wherein performing the CoW fallback process further comprises:
determining whether the source file is older than a threshold period of time.

### Claim 6 (depends on 1)

The system of claim 1, wherein performing the CoW fallback process further comprises:
determining a number of distinct values for each column in the source file; and
determining an estimate of memory that is required to compute all of the distinct values for each column based on a particular data type of that column.

### Claim 7 (depends on 6)

The system of claim 6, wherein the operations further comprise:
determining whether the estimate of memory for every column is greater than a threshold memory size.

### Claim 8 (depends on 1)

The system of claim 1, wherein performing the CoW fallback process further comprises:
determining whether a version of the source file is less than a particular version value.

### Claim 9 (depends on 1)

The system of claim 1, wherein the operations further comprise:
receiving a first query, the first query comprising a first set of statements, the first set of statements including at least a first statement for performing a first Data Manipulation Language (DML) operation on a first table;
determining a set of rows that are modified based on performing the first DML operation on the first table;
generating a first delta file based on the determined set of rows, the first delta file comprising a first bitset set to indicate a particular set of rows of the first table that have been deleted or updated, and a first set of rows that comprise a first set of new versions of a first set of updated rows from the set of rows;
associating the generated first delta file to a first file corresponding to the first table, the first table being unmodified after generating the first delta file and performing the first DML operation, and the generated first delta file representing a first set of differences from the first table after performing the first DML operation; and
storing the generated first delta file.

### Claim 10 (depends on 9)

The system of claim 9, wherein the operations further comprise:
receiving a second query, the second query comprising a second set of statements, the second set of statements including at least a second statement for performing a second DML operation on the first delta file representing the first set of differences from the first table after performing the first DML operation;
determining a second set of rows that are modified based on the second DML operation on the first delta file;
generating a second delta file based on the determined second set of rows, the second delta file comprising a second bitset set to indicate a second particular set of rows of the first table that have been deleted or updated, and a second set of rows that comprise a second set of new versions of a second set of updated rows from the second set of rows;
associating the generated second delta file to the first file corresponding to the first table, the first table being unmodified after generating the second delta file and performing the second DML operation, and the generated second delta file representing a second set of differences from the first delta file after performing the second DML operation; and
storing the generated second delta file.

### Claim 11

A method comprising:
receiving a first query, the first query comprising a first set of statements, the first set of statements including at least a first statement for performing a first Data Manipulation Language (DML) operation on a first table, the first table included in a source file;
executing the first query, the executing including determining whether to perform a copy-on-write (CoW) process, the determining comprising:
performing a CoW fallback process, the CoW fallback process comprising:
determining whether a ratio of a first number of deleted rows in a delta file over a second number of rows in the source file is greater than a threshold number of rows;
determining whether a first file size of the source file is smaller than a first threshold file size value;
determining whether the DML operation, when executing, is increasing a row size of the first table or a file size of the source file over a particular threshold size value; and
determining whether a resulting file size for a CoW file is smaller than a threshold CoW file size value; and
performing the copy-on-write process for the first query based on a result of the CoW fallback process.

### Claim 12 (depends on 11)

The method of claim 11, wherein a scanback operator determines whether the ratio of the first number of deleted rows in the delta file over the second number of rows in the source file and determines whether the first file size of the source file is smaller than the first threshold file size value.

### Claim 13 (depends on 11)

The method of claim 11, wherein performing the CoW fallback process further comprises:
determining whether the source file is a different file type than a micro-partition file.

### Claim 14 (depends on 11)

The method of claim 11, wherein performing the CoW fallback process further comprises:
determining whether a CoW decision override has been set for executing the first query.

### Claim 15 (depends on 11)

The method of claim 11, wherein performing the CoW fallback process further comprises:
determining whether the source file is older than a threshold period of time.

### Claim 16 (depends on 11)

The method of claim 11, wherein performing the CoW fallback process further comprises:
determining a number of distinct values for each column in the source file; and
determining an estimate of memory that is required to compute all of the distinct values for each column based on a particular data type of that column.

### Claim 17 (depends on 16)

The method of claim 16, further comprising:
determining whether the estimate of memory for every column is greater than a threshold memory size.

### Claim 18 (depends on 11)

The method of claim 11, wherein performing the CoW fallback process further comprises:
determining whether a version of the source file is less than a particular version value.

### Claim 19 (depends on 11)

The method of claim 11, further comprising:
receiving a first query, the first query comprising a first set of statements, the first set of statements including at least a first statement for performing a first Data Manipulation Language (DML) operation on a first table;
determining a set of rows that are modified based on performing the first DML operation on the first table;
generating a first delta file based on the determined set of rows, the first delta file comprising a first bitset set to indicate a particular set of rows of the first table that have been deleted or updated, and a first set of rows that comprise a first set of new versions of a first set of updated rows from the set of rows;
associating the generated first delta file to a first file corresponding to the first table, the first table being unmodified after generating the first delta file and performing the first DML operation, and the generated first delta file representing a first set of differences from the first table after performing the first DML operation; and
storing the generated first delta file.

### Claim 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 a first query, the first query comprising a first set of statements, the first set of statements including at least a first statement for performing a first Data Manipulation Language (DML) operation on a first table, the first table included in a source file;
executing the first query, the executing including determining whether to perform a copy-on-write (CoW) process, the determining comprising:
performing a CoW fallback process, the CoW fallback process comprising:
determining whether a ratio of a first number of deleted rows in a delta file over a second number of rows in the source file is greater than a threshold number of rows;
determining whether a first file size of the source file is smaller than a first threshold file size value;
determining whether the DML operation, when executing, is increasing a row size of the first table or a file size of the source file over a particular threshold size value; and
determining whether a resulting file size for a CoW file is smaller than a threshold CoW file size value; and
performing the copy-on-write process for the first query based on a result of the CoW fallback process.
