Schema evolution support in hybrid transactional/analytical processing (HTAP) workloads
Abstract
The subject technology receives a request to perform a table scan operation of a table. The subject technology determines that the table is being accessed for an initial time. The subject technology populates a columnar cache with data of the table provided by the table scan operation. The subject technology determines a set of schema versions of a set of rows from the data of the table. The subject technology determines schema information of each schema from the set of schema versions. The subject technology generates a result rowset and a second rowset comprising a union of columns that have appeared at least once in each row. The subject technology performs deserialization of rows from the result rowset and the second rowset. The subject technology provides the rows from the result rowset and the second rowset to write to a file in a particular format.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 14 · Forward citations: 0.
Claims (20 — 3 Independent, 17 Dependent)
- Claim 1Independent Claim
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 a request to perform a table scan operation of a table; determining that the table is being accessed for an initial time; populating a columnar cache with data of the table provided by the table scan operation; determining a set of schema versions of a set of rows from the data of the table; determining, using at least a schema cache, schema information of each schema from the set of schema versions, the schema cache being provided by an execution node; generating a result rowset and a second rowset comprising a union of columns that have appeared at least once in each row; performing deserialization of rows from the result rowset and the second rowset; providing the rows from the result rowset and the second rowset to write to a file in a particular format for storing in the columnar cache; generating a particular schema version based on a union of columns that have appeared at least once in a set of rows, the particular schema version being utilized as part of a write operation, the write operation comprising writing data from at least one blob file to a particular file in a different format for storing in the columnar cache; and storing the particular schema version in the schema cache provided by the execution node.
- Claim 2Depends on #1
The system of claim 1, wherein the operations further comprise: receiving a query including a statement to perform a read operation on a particular table; determining a set of column ordinals referenced by the query; and performing a scan of the columnar cache based on the set of column ordinals to determine at least one requested column.
- Claim 3Depends on #2
The system of claim 2, wherein the operations further comprise: determining that the columnar cache does not store the at least one requested column; filling the at least one requested column with a current default value; and providing the at least one requested column with the current default value in a particular result rowset from executing the query.
- Claim 4Depends on #2
The system of claim 2, wherein the operations further comprise: determining that the at least one requested column is defined as not storing a null value; determining that the columnar cache does not store the at least one requested column; and providing an indication of an error as a result of the query.
- Claim 5Depends on #2
The system of claim 2, wherein the operations further comprise: determining that the at least one requested column is defined as not storing a null value; determining that the columnar cache includes a null value stored in the at least one requested column; and providing an indication of an error as a result of the query.
- Claim 6Depends on #1
The system of claim 1, wherein the operations further comprise: receiving a particular query, the particular query including a query range for processing the query; sending a request to a key-value store for blob metadata and a set of recent writes for the query range; receiving the blob metadata, the blob metadata including information related to at least one blob file; and determining that the at least one blob file includes a set of rows with multiple schema versions.
- Claim 7Depends on #1
The system of claim 1, wherein the particular format comprises a Parquet file.
- Claim 8Depends on #1
The system of claim 1, wherein the columnar cache is stored locally in an execution node, the execution node executing the table scan operation of the table, the table scan operation being performed in connection with a particular query received by the execution node for execution.
- Claim 9Depends on #1
The system of claim 1, wherein the operations further comprise: determining, by querying a metadata database, the schema information of each schema from the set of schema versions.
- Claim 10Depends on #1
The system of claim 1, wherein the second rowset includes a set of dropped columns based on previous schema information of at least one previous schema version.
- Claim 11Independent Claim
A method comprising: receiving a request to perform a table scan operation of a table; determining that the table is being accessed for an initial time; populating a columnar cache with data of the table provided by the table scan operation; determining a set of schema versions of a set of rows from the data of the table; determining, using at least a schema cache, schema information of each schema from the set of schema versions, the schema cache being provided by an execution node; generating a result rowset and a second rowset comprising a union of columns that have appeared at least once in each row; performing deserialization of rows from the result rowset and the second rowset; providing the rows from the result rowset and the second rowset to write to a file in a particular format for storing in the columnar cache; generating a particular schema version based on a union of columns that have appeared at least once in a set of rows, the particular schema version being utilized as part of a write operation, the write operation comprising writing data from at least one blob file to a particular file in a different format for storing in the columnar cache; and storing the particular schema version in the schema cache provided by the execution node.
- Claim 12Depends on #11
The method of claim 11, further comprising: receiving a query including a statement to perform a read operation on a particular table; determining a set of column ordinals referenced by the query; and performing a scan of the columnar cache based on the set of column ordinals to determine at least one requested column.
- Claim 13Depends on #12
The method of claim 12, further comprising: determining that the columnar cache does not store the at least one requested column; filling the at least one requested column with a current default value; and providing the at least one requested column with the current default value in a particular result rowset from executing the query.
- Claim 14Depends on #12
The method of claim 12, further comprising: determining that the at least one requested column is defined as not storing a null value; determining that the columnar cache does not store the at least one requested column; and providing an indication of an error as a result of the query.
- Claim 15Depends on #12
The method of claim 12, further comprising: determining that the at least one requested column is defined as not storing a null value; determining that the columnar cache includes a null value stored in the at least one requested column; and providing an indication of an error as a result of the query.
- Claim 16Depends on #11
The method of claim 11, further comprising: receiving a particular query, the particular query including a query range for processing the query; sending a request to a key-value store for blob metadata and a set of recent writes for the query range; receiving the blob metadata, the blob metadata including information related to at least one blob file; and determining that the at least one blob file includes a set of rows with multiple schema versions.
- Claim 17Depends on #11
The method of claim 11, wherein the particular format comprises a Parquet file.
- Claim 18Depends on #11
The method of claim 11, wherein the columnar cache is stored locally in an execution node, the execution node executing the table scan operation of the table, the table scan operation being performed in connection with a particular query received by the execution node for execution.
- Claim 19Depends on #11
The method of claim 11, further comprising: determining, by querying a metadata database, the schema information of each schema from the set of schema versions.
- Claim 20Independent Claim
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 request to perform a table scan operation of a table; determining that the table is being accessed for an initial time; populating a columnar cache with data of the table provided by the table scan operation; determining a set of schema versions of a set of rows from the data of the table; determining, using at least a schema cache, schema information of each schema from the set of schema versions, the schema cache being provided by an execution node; generating a result rowset and a second rowset comprising a union of columns that have appeared at least once in each row; performing deserialization of rows from the result rowset and the second rowset; providing the rows from the result rowset and the second rowset to write to a file in a particular format for storing in the columnar cache; generating a particular schema version based on a union of columns that have appeared at least once in a set of rows, the particular schema version being utilized as part of a write operation, the write operation comprising writing data from at least one blob file to a particular file in a different format for storing in the columnar cache; and storing the particular schema version in the schema cache provided by the execution node.
Technical Overview & Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application is a continuation-in-part of U.S. Non-Provisional patent application Ser. No. 18/455,229, filed Aug. 24, 2023, entitled “ COLUMNAR CACHE IN HYBRID TRANSACTIONAL/ANALYTICAL PROCESSING (HTAP) WORKLOADS, ” and the contents of which are incorporated herein by reference in its entirety for all purposes. TECHNICAL FIELD Embodiments of the disclosure relate generally to a network-based database system or a cloud data platform and, more specifically, to processing database operations and more specifically to performing database processing of large database requests. BACKGROUND Cloud-based data warehouses and other database systems and platforms sometimes provide support for transactional processing that enable such systems to perform operations that are not available through the built-in, system-defined functions. However, transactional processing of the data can rapidly grow, and it can be difficult to compact the data in a secure manner that does not affect accuracy or integrity of the data. BRIEF DESCRIPTION OF THE DRAWINGS The present disclosure will be understood more fully from the detailed description given below and from the accompanying drawings of various embodiments of the disclosure. FIG. 1 illustrates an example computing environment that includes a network-based database system in communication with a cloud storage platform, in accordance with some embodiments of the present disclosure. FIG. 2 is a block diagram illustrating components of a compute service manager, in accordance with some embodiments of the present disclosure. FIG. 3 is a block diagram illustrating components of an execution platform, in accordance with some embodiments of the present disclosure. FIG. 4 is a computing environment conceptually illustrating an example software architecture for managing and executing concurrent transactions on a database system, in accordance with some embodiments of the present disclosure. FIG. 5 is a flow
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (14)
| Patent | Title | Year | Citations |
|---|---|---|---|
| US 8,396,886 B1 | Continuous processing language for real-time data streams | 2013 | 2 |
Non-Patent Literature (10)
- “
- U.S. Appl. No. 18/455,229, Non Final Office Action mailed Nov. 16, 2023
- ”
- , 30 pages.
- “
- U.S. Appl. No. 18/455,229, Response filed Jan. 30, 2024 to Non Final Office Action mailed Nov. 16, 2023
- ”
- , 12 pgs.
- “
- U.S. Appl. No. 18/455,229, Final Office Action mailed Mar. 5, 2024