Evaluating rowstore expressions on columnstore databases

By using an interceptor virtual machine on the column-store database to maintain the mapping from row-store results to column-store data storage addresses, and directly executing the row-store expression tree, the problem that column-store databases cannot directly use row-store expression trees is solved, thus improving query efficiency.

CN118829977BActive Publication Date: 2026-11-20GOOGLE LLC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202380025181.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2023-02-10
Filing Date
2023-04-07
Publication Date
2026-11-20
Estimated Expiration
2043-04-07

AI Technical Summary

Technical Problem

Existing technologies cannot directly execute row-store expression trees on column-store databases, requiring the expression tree to be rewritten to adapt to column-store databases, resulting in low efficiency.

Method used

By using an interceptor virtual machine (VM) to maintain the mapping between row storage results and column storage addresses, the row storage expression tree is executed directly on the column storage database. The results are generated using column operators and the row storage addresses are recorded, thus avoiding the need to rewrite the expression tree.

Benefits of technology

It enables efficient execution of row-stored expression trees on column-store databases, improving query performance, reducing the need to rewrite expression trees, and enhancing the efficiency of database management systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118829977B_ABST
    Figure CN118829977B_ABST
Patent Text Reader

Abstract

This disclosure provides a way to execute row-stored expression data structures locally on a column-stored database without rewriting them. A database management system (DBMS) configured as described herein can maintain a mapping between row-stored results and the addresses where the corresponding column data is stored. When executing operators such as logical operators, comparison operators, and / or function operators of the received query expression, the DBMS can operate on the column data rather than on individual rows. The DBMS can store the results generated by executing column operators, for example, on a stack, and record the row storage addresses corresponding to the stored results. The DBMS responds with multiple rows corresponding to the processed column data.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross-reference to related applications

[0002] This application is a continuation of U.S. Patent Application No. 18 / 167,134, filed February 10, 2023, which claims the benefit of U.S. Provisional Patent Application No. 63 / 340,234, filed May 10, 2022, the disclosures of which are hereby incorporated herein by reference. Background Technology

[0003] A Database Management System (DBMS) is a system used to manage one or more databases and to receive and resolve queries against those databases. A DBMS manages one or more tables or relationships of data stored on one or more storage devices that form part of one or more managed databases. A DBMS can read and write individual rows or columns of the managed tables, including updating, deleting, and adding records.

[0004] A DBMS can store data blocks representing tables within a database. The database can be a row-stored database, where the expression tree representing the operations of a received query is evaluated row-by-row by the DBMS, and data is stored row-by-row such that the first column of a row is immediately adjacent to the last column of the previous row. In a column-stored database, the expression tree is evaluated column-by-column, and data is stored such that each row of a column is immediately adjacent to the other rows in the same column. Expression trees generated for row-stored databases cannot be used by DBMSs for column-stored databases, and vice versa. For example, a row-stored expression tree, when executed, accesses the values ​​of columns within a single row, not the values ​​of columns across multiple rows. Therefore, row-stored expression trees cannot be used as drop-in options for column-stored databases. Consequently, DBMSs for column-stored databases rewrite expression trees to handle columnar data. Summary of the Invention

[0005] This disclosure provides the ability to execute row-stored expression data structures locally on a column-stored database without rewriting the expression data structures. A database management system (DBMS) configured as described herein can maintain a mapping between row-stored results and the addresses where the corresponding column data is stored. When executing operators such as logical operators, comparison operators, and / or function operators of the received query expression, the DBMS can operate on the column data rather than on individual rows. The DBMS can store the results generated by executing column operators, for example, on a stack, and record the row storage addresses corresponding to the stored results. The DBMS responds with multiple rows corresponding to the processed column data.

[0006] This disclosure includes a method comprising: receiving, by one or more processors, a query for data maintained in a column-store database; generating, by the one or more processors, an expression tree representing the received query, the expression tree including one or more row-store operators for performing operations on a row-store database; and, in response to the received query, retrieving, by the one or more processors and using the expression tree, at least a portion of one or more rows comprising column-store data from the column-store database.

[0007] Other aspects of this disclosure include a system comprising one or more processors configured to perform methods for evaluating a row-stored expression tree on a column-stored database. Aspects of this disclosure also provide a computer-readable storage medium encoded with instructions that, when executed by the one or more processors, cause the one or more processors to perform one or more methods for evaluating a row-stored expression tree on a column-stored database, such as those described herein.

[0008] In some examples, retrieving at least a portion of one or more rows includes a mapping between a memory address that generates the target address of each of the one or more row storage operators and a corresponding target address used to store the corresponding column storage result of the row storage operator.

[0009] In some examples, generating the mapping involves launching a virtual machine that includes stack memory, which is configured to maintain the mapping.

[0010] In some examples, retrieving at least a portion of one or more rows may include accessing column values ​​by at least partially executing row storage operators in an expression tree, wherein accessing column values ​​includes returning values ​​from a columnstore database.

[0011] In some examples, retrieving at least a portion of one or more rows may include executing row storage function operators of one or more row storage operators in the expression tree and targeting column values, including executing the corresponding column storage function operator on columns that include column values.

[0012] In some examples, retrieving at least a portion of one or more rows may include storing intermediate results generated by performing one or more row storage operators in one or more dummy columns.

[0013] This disclosure includes a system comprising one or more processors configured to perform one or more methods disclosed herein.

[0014] Aspects of this disclosure include one or more non-transitory computer-readable storage media encoded with instructions that, when executed by one or more processors, cause the one or more processors to perform one or more methods described herein. Attached Figure Description

[0015] Figure 1 This is a block diagram of an example database management system (DBMS) configured to perform row-stored expression trees on column-stored data, according to aspects of this disclosure.

[0016] Figure 2 This is a block diagram of a columnar cache of cached data according to aspects of this disclosure.

[0017] Figure 3A It is a diagram of a sample line storage expression tree based on aspects of this disclosure.

[0018] Figure 3B This is a diagram illustrating example evaluation of a row-stored expression tree on a column-stored database according to aspects of this disclosure.

[0019] Figure 4 This is a flowchart of an example process for evaluating a row-stored expression tree on a column-stored database, according to aspects of this disclosure.

[0020] Figure 5 This is a block diagram of an example computing environment implementing a DBMS according to aspects of this disclosure. Detailed Implementation

[0021] In a database, expression trees can be used to evaluate predicates, projections, and aggregate expressions for queries. In row-stored databases, expression trees for queries or other inputs are evaluated row-by-row and cannot be used in column-stored databases. Column-stored databases rewrite expression trees to handle columnar data. For column-stored databases, there is no insert-out option to use the expression tree generated for row-stored data. Insert-out options refer to the ability of a DBMS managing column-stored databases to implement row-stored database management functionalities without modifying the implementation to account for the differences between row-stored and column-stored databases.

[0022] This disclosure provides the ability to locally execute row-stored expression data structures on a column-store database without rewriting the expression data structures to column-store format. The database management system (DBMS) maintains a mapping between row-stored results and the addresses where the corresponding column data is stored. When executing operators such as logical operators, comparison operators, and / or function operators of the received query expression, the DBMS can operate on the column data rather than on individual rows. The DBMS can store the results generated by executing column operators, for example, on a stack, and record the row storage addresses corresponding to the stored results. The DBMS responds with multiple rows corresponding to the processed column data.

[0023] This disclosure provides virtualization techniques for enabling the execution of row-stored expression trees on column-stored data. An interceptor virtual machine (VM) maintains a mapping between the row-stored results of the received expression tree and the addresses of the column-stored data stored in the column-stored database. Operators (e.g., logical operators, comparison operators, or function operators) representing the query in the expression tree are executed on the column data, rather than on individual rows. The interceptor VM stores the results generated by the column operators on a stack and records their corresponding row-store addresses.

[0024] When the DBMS executes an operator that requires operands, it can provide the operands from the column data. The DBMS can look up a mapping of the row-stored results and provide access to the corresponding column data. The DBMS generates a row-stored expression tree or other similar data structure to track which operands correspond to which parts of one or more executed operators. The result of executing the row-stored expression tree on the column data can be a result array. The values ​​of the result array can be returned by an iterator implemented by the DBMS. In this way, the need to rewrite the expression tree for columnar data is eliminated.

[0025] The aspects disclosed herein offer at least the following advantages: Eliminating the need to rewrite expression trees for column-stored databases. Existing row-stored expression services can be plugged into DBMSs that manage column-stored data without first rewriting the service to natively support column-stored data. Furthermore, improvements to row-stored expression tree generation and execution also directly improve column-stored data-based DBMSs, at least due to the functionality and improvements extended from both row-stored and column-stored data-based operators. Expression processing can be applied to a variety of different trees, including predicate, projection, and aggregation expression trees.

[0026] Figure 1A block diagram of an example database management system (DBMS) 100 configured to execute row-stored expressions on column-stored data according to aspects of this disclosure is depicted. DBMS 100 may be implemented on one or more computing devices in one or more physical locations. For example, DBMS 100 may be configured to manage data on a computing platform of the computing device, which may include multiple computing devices and / or storage devices. DBMS 100 may include an interceptor virtual machine (VM) 150, a columnar cache 110, a query execution engine 120, a database 130, and a planner 135.

[0027] DBMS 100 can be configured to receive queries (such as query 108 from computing device 105) and resolve queries by providing responses (such as query response 112). Query response 112 may include one or more rows or columns, or portions of one or more rows or columns, from one or more tables of database 130. Prior to providing query response 112, DBMS 100 may optionally process the data, for example, by aggregating and / or sorting the rows of the response. The operation of processing query response 112 may be provided as part of the received query 108, and / or may be part of a predetermined pipeline that DBMS 100 is configured to execute as part of resolving query 108.

[0028] Computing device 105 can be any of a variety of computing devices configured to query a database. For example, computing device 105 can be a personal laptop, server, wearable device, sensor, etc. Computing device 105 can be user-operated and includes peripheral devices or other components for receiving user input. In other examples, computing device 105 can be configured to communicate automatically with DBMS 100, for example, as part of computing device 105 executing computer programs, scripts, or hardware / firmware operations. DBMS 100 and computing device 105 can communicate via a network and / or any of a variety of wired or wireless connections.

[0029] In some examples, DBMS100 may be a Hybrid Transaction and Analytical Processing System (HTAP). An HTAP system is a database management system configured to perform both Online Transaction Processing (OLTP) and Online Analytical Processing (OLAP). An OLTP system is configured to coordinate and execute transactions between communicating computing devices. Transactions are recorded and updated in the corresponding database managed by the OLTP system. An OLAP system is configured to receive and resolve queries to the database as part of the analysis of data stored in the database. OLAP and OLTP systems are optimized separately for their respective use cases, with OLAP systems typically optimized for read-only access to data, while OLTP systems are optimized for both read and write access to the queried data.

[0030] To improve query resolution performance, DBMS100 implements a columnar cache 110. Queries for OLAP systems and OLAP-enabled HTAP systems may include requests for data referenced by columns of tables in the database, rather than references to individual rows, which is more common in OLTP. To speed up query resolution by column, DBMS100 implements a columnar cache 110.

[0031] Columnar cache 110 can be implemented asynchronously, therefore it may sometimes contain stale data, such as invalid blocks. At least for some applications (such as HTAP systems), DBMS 100 should answer query 108 and simultaneously accept updates to the base table where the data is cached. DBMS 100 can enable mixed query execution by allowing the use of asynchronous columnar cache through the execution of query 108, which allows data retrieval from both columnar cache 110 and database 130. It should be understood that column data retrieved during the execution of the row-stored expression tree described herein can be retrieved from a combination of column-stored database 130 and / or columnar cache 110.

[0032] Figure 2 A block diagram depicts a columnar cache 110 with cached data. Figure 2 In the diagram, columnar cache 110 is shown as a cache portion of database table 201. Columns 5, 15, 25, 35, and 45 in columnar cache 110 can be referenced using the corresponding table fragment indexes and row indexes. A group of rows can form a data block. Each data block 102, 104 has a corresponding index. Within each block 102, 104, each row in the table fragment has a corresponding row index. Each row in block 102 (such as row 10, row 20, and row 30) can be referenced according to the corresponding row index. Similarly, row 40, row 50, and row 60 can be referenced according to the corresponding row index. Multiple data blocks can be referred to as table fragments. The number of blocks in a table fragment can vary depending on performance and overhead requirements and the implementation, for example, 4096 blocks per fragment. It should be noted that columnar cache 110 can include any number of rows, columns, blocks, table fragments, etc., and Figure 2 The number of elements shown is for illustrative purposes only.

[0033] The columnar cache 110 may include any of a variety of memory devices used for caching data. For example, a columnar cache may be implemented in main memory such as RAM or DRAM. Alternatively, the columnar cache 110 may be implemented in persistent storage, such as on a solid-state drive or hard disk drive, on a local machine, and / or on a remote server across a network.

[0034] Return to reference Figure 1 Database 130 may be a collection of tables or relationships that store data along multiple dimensions. For example, tables in database 130 may store data along rows and columns. Database 130 may be implemented on a storage device, such as a directly attached storage device (including solid-state drives, hard disk drives, flash drives), a network-attached storage device, an array of various combinations of different or identical storage devices, etc. Database 130 may be a column-oriented database.

[0035] The query execution engine 120 can be configured to receive query 108 and generate query response 112. Query 108 may be part of a workload performed by computing device 105 or some other device (not shown). A workload may refer to one or more computer programs or scripts that include operations of querying DBMS 100 for data. The workload may be automatic and continuous, or it may be executed at pre-programmed time intervals. In other examples, the workload is executed on demand by computing device 105, for example, in response to user input from device 105.

[0036] A query 108 against DBMS 100 may include data specifying data columns to be retrieved from DBMS 100. The specified data may be stored in columnar cache 110 or database 130 at execution time. Query execution engine 120 may be configured to retrieve the queried data specified in a given query 108 and return that data as part of query response 112.

[0037] As part of resolving query 108, DBMS 100 is configured to generate a query execution plan. DBMS 100 may include a planner 135 or communicate with a planner external to DBMS 100. Planner 135 can generate a query execution plan based on any of various processes. As part of generating the query execution plan, planner 135 can parse the received query 108 and select corresponding query operations to be executed according to the plan based on several predetermined criteria. For example, predetermined criteria may be based on efficient use of computing or storage resources, the number of operations to be performed, the total time to execute query 108, user input specifying certain types of operations to be performed, etc. Planner 135 can receive and parse query 108 to generate a query execution plan.

[0038] A query operation can refer to an action performed by the query execution engine 120 as part of executing or resolving a received query 108. Query operations may include reading data from or writing data to memory, performing arithmetic or logical calculations, performing corresponding procedures for sorting, hashing, joining, aggregation, and scanning data, etc. A query execution plan can be a directed graph, such as an expression evaluation tree, representing nodes of different operations to be performed by the DBMS 100 as part of executing query 108. A query execution plan can also be represented as an ordered list or array of operations, the order of which the planned operations must be executed in order to correctly execute the received and resolved query 108.

[0039] The query response 112 generated by the query execution engine 120 is returned to the computing device 105. In some examples, the query response 112 may be returned to another destination computing device (not shown) that can be specified as the destination by the computing device 105. The computing device 105 may continue to process the query response 112 as part of a downstream process that may include subsequent queries to the DBMS 100 as part of the same or different workloads.

[0040] DBMS 100 can use an interface (such as a graphical user instance) displayed on the display of computing device 105 to transfer data between computing device 105 and / or another computing device (not shown). This interface may include multiple user-interactive elements, such as buttons, toggle switches, sliders, checkboxes, etc., for modifying the behavior of DBMS 100 and / or displaying certain types of information currently described. In other examples, the interface may include an API that exposes DBMS 100, which is used to modify various parameters related to the functionality of DBMS 100, such as cache configuration, based on API calls.

[0041] Although expression trees are referenced, it should be understood that other data structures can be used to represent operators and operands of varying complexity, as well as nested dependencies between operators. Operators are keywords or phrases defined in the language and corresponding to certain operations that the DBMS is configured to perform. For example, the language may specify the JOIN operator to perform table joins, combining columns from selected tables to generate a new table. Columns can be specified by the JOIN condition, which DBMS100 is configured to recognize in query 108 to perform the join based on the conditions specified in query 108.

[0042] The interceptor VM 150 is configured to intercept the execution of row-store operators in the generated or received expression evaluation tree and replace the operators with the corresponding column-store operators. For example, the row-store database join operator is replaced with the column-store database join operator, and so on. About Figures 3A to 4 Table 1 provides an example pipeline for evaluating row-stored expressions against column-stored database 130.

[0043] Figure 3A This is a diagram of the example line storage expression tree 300A. Expression tree 300A includes three operators: OP1, OP2, and OP3. The expression tree can be executed from bottom to top. Value 1 and value 2 can be retrieved to form result 1 and result 2, respectively. Result 1 and result 2 can be used to execute OP1 to produce result 5. Similarly, value 3 and value 4 can be retrieved to form result 3 and result 4, respectively. Result 3 and result 4 can be used to execute OP2 to produce result 6. OP3 can take result 5 and result 6 as input and produce result 7 as output.

[0044] Figure 3B This is a diagram illustrating the evaluation of row-stored expression tree 300A on a column-stored database according to aspects of this disclosure, specifically for evaluating 300B.

[0045] like Figure 3B As shown, Result 1 and Result 2 can be entire columns containing values ​​1 and 2, respectively. The column storage operators Col OP1, Col OP2, and Col OP3 can be respectively... Figure 3A The column storage operators OP1, OP2, and OP3 correspond to their respective equivalents. Similarly, results 3 and 4 can be represented by their respective storage equivalents. Figure 3A Values ​​3 and 4 correspond to columns 3 and 4. Col OP 1 and Col OP 2 can be executed by DBMS100, and the corresponding results 5 and 6 can be pushed onto the stack of interceptor VM 150. DBMS100 can execute Col OP 3 corresponding to OP 3 and push result 7 onto the stack. Results 1 through 7 correspond to column data. DBMS100 can execute a result iterator to generate results row by row corresponding to row-stored expression tree 300A.

[0046] Table 1 shows an example sequence of operations for evaluating a row-stored expression tree on a column-stored database according to aspects of this disclosure. The query execution engine 120 of DBMS 100 can execute the operators represented in the expression tree. An interceptor VM 150 can intercept the execution of the expression tree to replace the target row-stored data with the corresponding column-stored data, and the query execution engine 120 can execute the column-stored operators corresponding to the row-stored operators in the input expression tree.

[0047]

[0048]

[0049] Table 1

[0050] In step 1, the query execution engine reads the column values ​​targeted by the row storage operators in the expression tree into memory locations, such as cache memory or other dedicated memory used for evaluating the expression tree. The interceptor VM150 maps the memory locations to the corresponding column storage addresses.

[0051] At step 2, the query execution engine 120 reads column values ​​from a memory location. The interceptor VM 150 can demap the memory location to retrieve the column address stored in step 1. The query execution engine 120 can then store the corresponding column address in a location in memory (e.g., virtual memory).

[0052] At step 3, logical operators can be executed. Logical operators may include comparison operators such as "greater than," "less than," or "equal to." Row-store operators are executed using two memory locations, one memory location for each operand. The result of the operator is stored in the output memory location. Interceptor VM 150 demaps the memory locations to obtain the corresponding column addresses in column-store database 130. The logical operators are replaced with columnar logical operators, for example, corresponding versions of the row-store logical operators, but used for column-store database 130. The output memory location is mapped to a stack memory location in a stack maintained by interceptor VM 150. DBMS 100 reads the column addresses from the memory locations and performs the corresponding columnar operations for the logical operators. The resulting column data is stored at the stack memory location mapped from the output memory location from which the row-store logical operators were executed.

[0053] In step 4, the query execution engine 120 executes function operators in the input expression tree. Example function operators include substring, trim, and join. The function operators are executed using memory locations specified as operands in the expression tree, and the results are stored in the output memory location. The interceptor VM 150 demaps the output memory location to retrieve the corresponding column address. The function operator is replaced with a corresponding columnar function operator, and the output memory location is mapped to a stack memory location maintained by the interceptor VM 150. The query execution engine 120 reads the column address from the memory location and performs columnar operations. The query execution engine 120 may create virtual columns and store their addresses in the stack memory location.

[0054] At step 5, steps 3 and 4 can be performed recursively. For example, expression trees with multiple nested operators can be processed recursively. Steps 3 and 4 can be repeated as many times as the corresponding logical or function operators present in the received expression tree.

[0055] At step 6, in response to evaluating the expression tree, result rows that meet the conditions are returned. To do this, interceptor VM 150 reads the top of the stack memory to obtain the result vector of column data. Interceptor VM 150 constructs an iterator to return rows from the column data. Query execution engine 120 returns the top result of the iterator, such as a row or a portion of a row, and may iterate multiple times in response to evaluating the expression tree to return multiple rows.

[0056] For expression trees with nested operators, for example, see reference... Figures 3A to 3B As shown and described, in step 7, the query execution engine 120 stores the sub-expression tree results in a memory location. The interceptor VM 150 can iterate through steps 1 through 6 for as many sub-expression tree results as exist in the input expression tree. For expression trees without sub-expression trees (e.g., those with a single operator), step 7 is omitted.

[0057] In step 8, the aggregated results of the execution expression tree can be combined. For example, query execution engine 120 can execute... Figure 3A The expression tree 300A is processed on its left-hand side, and then the right-hand side is executed. The results of executing the opposite sides can be summed together (e.g., using a merge or join operator represented by Col OP 3), and the results are stored in a memory location. The interceptor VM 150 demaps the memory location to obtain two column addresses. The operators used for each side of the aggregation expression tree are replaced with columnar aggregation functions. The aggregated output memory location is mapped to a stack memory location maintained by the interceptor VM 150. The query execution engine 120 can read the column addresses from the memory location and execute the columnar aggregation operators. The query execution engine 120 can create virtual columns with the aggregation results and store the virtual column addresses on the stack memory location.

[0058] Figure 4 This is a flowchart of an example procedure 400 for evaluating an expression generated for a row-store database on a column-store database. Example procedure 400 can be implemented on a system with one or more processors in one or more locations (such as...). Figure 1 Execute on the example DBMS100).

[0059] According to box 410, DBMS 100 receives a query 108 for data maintained in columnstore database 130.

[0060] According to box 420, DBMS 100 generates an expression tree representing the received query 108, which includes one or more row-store operators for performing operations on the row-store database. In some examples, DBMS 100 may receive the expression tree from another source instead of generating it.

[0061] According to box 430, DBMS 100 responds to the received query 108 by using an expression tree to retrieve at least a portion of one or more rows, which include columnstore data from columnstore database 130.

[0062] As part of retrieving one or more rows, DBMS 100 can generate a mapping between the memory address of the target address of each row storage operator in one or more row storage operators and the corresponding target address used to store the corresponding column storage result used to execute the row storage operator.

[0063] As part of generating the mapping, DBMS100 may launch a virtual machine that includes stack memory, such as the interceptor VM 150 as described herein. The interceptor VM 150 can be configured to maintain the mapping.

[0064] Retrieving at least a portion of one or more rows includes accessing column values ​​by at least partially executing row storage operators in an expression tree, wherein accessing column values ​​includes returning values ​​from the column storage database 130.

[0065] Retrieving at least a portion of one or more rows may include executing row storage function operators of one or more row storage operators in an expression tree and targeting column values, including executing the corresponding column storage function operator on columns that include column values.

[0066] Retrieving at least a portion of one or more rows may include storing intermediate results generated by performing one or more row storage operators in one or more virtual columns.

[0067] Figure 5 A block diagram depicts an example computing environment 600 implementing a DBMS 100 that maintains transactional consistency in a columnar cache 110. The DBMS 100 may be implemented on one or more devices with one or more processors in one or more locations, such as in a server computing device 615. User computing devices 612 and server computing devices 615 may be communicatively coupled to one or more storage devices 630 via a network 660. Server computing devices 615 and storage devices 630 may form part of a computing platform 601. The computing platform 601 may be a cloud computing platform that provides various services, such as providing computing and storage resources to platform users.

[0068] Storage device 630 may be a combination of volatile and non-volatile memory, and may be located in the same or different physical locations as computing devices 612 and 615. For example, storage device 630 may include any type of non-transitory computer-readable medium capable of storing information, such as hard disk drives, solid-state drives, magnetic tape drives, optical storage, memory cards, ROM, RAM, DVDs, CD-ROMs, writable memory, and read-only memory.

[0069] Server computing device 615 may include one or more processors 613 and memory 614. Memory 614 may store information accessible by processor 613, including instructions 621 executable by processor 613. Memory 614 may also include data 623 retrievable, manipulated, or stored by processor 613. Memory 614 may be a type of non-transitory computer-readable medium capable of storing information accessible by processor 613, such as volatile memory and non-volatile memory. Processor 613 may include one or more central processing units (CPUs), graphics processing units (GPUs), field-programmable gate arrays (FPGAs), and / or application-specific integrated circuits (ASICs), such as tensor processing units (TPUs).

[0070] Instruction 621 may include one or more instructions that, when executed by processor 613, cause one or more processors to perform actions defined by instruction 621. Instruction 621 may be stored in an object code format for direct processing by processor 613, or in other formats, including interpretable scripts or sets of stand-alone source code modules that are interpreted on demand or compiled in advance. Instruction 621 may include instructions for implementing DBMS 100 consistent with aspects of this disclosure. DBMS 100 may be executed using processor 613 and / or other processors located remotely from server computing device 615.

[0071] Data 623 can be retrieved, stored, or modified by processor 613 according to instructions 621. Data 623 can be stored in computer registers, as a table with multiple different fields and records in a relational or non-relational database, or as a JSON, YAML, proto, or XML document. Data 623 can also be formatted in a computer-readable format, such as, but not limited to, binary values, ASCII, or Unicode. Furthermore, data 623 may include information sufficient to identify relevant information, such as numbers, descriptive text, proprietary codes, pointers, references to data stored in other memory (including other network locations), or information used by functions to calculate relevant data.

[0072] User computing device 612 may also be configured similarly to server computing device 615, having one or more processors 616, memory 617, instructions 618, and data 619. User computing device 612 may also include user output 626 and user input 624. User input 624 may include any suitable mechanism or technology for receiving input from a user, such as a keyboard, mouse, mechanical actuator, soft actuator, touch screen, microphone, and sensor.

[0073] Server computing device 615 may be configured to transmit data to user computing device 612, and user computing device 612 may be configured to display at least a portion of the received data on a display implemented as part of user output 626. User output 626 may also be used to display the interface between user computing device 612 and server computing device 615. User output 626 may alternatively or additionally include one or more speakers, transducers or other audio outputs, haptic interfaces, or other haptic feedback that provides non-visual and non-audio information to the platform user of user computing device 612.

[0074] Although Figure 5 Processors 613, 616 and memories 614, 616 are shown as being within computing devices 615, 612; however, the components described herein (including processors 613, 616 and memories 614, 617) may include multiple processors and memories that can operate in different physical locations and not within the same computing device. For example, some of instructions 621, 618 and data 623, 619 may be stored on a removable SD card, while others may be stored within a read-only computer chip. Some or all of the instructions and data may be stored in a location physically remote from processors 613, 616 but still accessible by processors 613, 616. For example, processors 613, 616 may include a set of processors capable of performing concurrent and / or sequential operations. Computing devices 615, 612 may each include one or more internal clocks that provide timing information for time measurement of operations and programs run by computing devices 615, 612.

[0075] Server computing device 615 may be configured to receive requests from user computing device 612 to process data. For example, environment 600 may be part of a computing platform configured to provide various services to users through various user interfaces and / or APIs that display platform services. One or more services may be a machine learning framework, or a set of tools for generating neural networks or other machine learning models based on specified tasks and training data. User computing device 612 may receive and transmit data specifying target computing resources to be allocated for executing neural networks trained to perform specific neural network tasks.

[0076] Computing devices 612 and 615 may communicate directly and indirectly via network 660. Devices 615 and 612 may be configured with listening sockets that can accept initiating connections for sending and receiving information. Network 660 itself may include various configurations and protocols, including the Internet, World Wide Web, intranet, virtual private network, wide area network, local area network, and private networks using one or more proprietary communication protocols. Network 660 may support various short-range and long-range connections. Short-range and long-range connections can be made through different bandwidths, such as those typically used with… The standard-associated 2.402 GHz to 2.480 GHz, typically with The communication protocols are associated with 2.4GHz and 5GHz; or multiple communication standards are used, such as those for wireless broadband communication. Standard. Alternatively, network 660 may also support wired connections between devices 612 and 615, including via various types of Ethernet connections.

[0077] although Figure 5 The illustration shows a single server computing device 615 and a user computing device 612; however, it should be understood that aspects of this disclosure can be implemented with various configurations and numbers of computing devices (including in examples of sequential or parallel processing), or through a distributed network of multiple devices. In some implementations, aspects of this disclosure can be performed on a single device or any combination thereof.

[0078] The aspects of this disclosure may be implemented in digital circuits, computer-readable storage media, as one or more computer programs, or a combination of the foregoing. The computer-readable storage medium may be non-transitory, for example, as one or more instructions executable by a cloud computing platform and stored on a physical storage device.

[0079] In this specification, the phrase "configured to" is used in various contexts relating to a computer system, hardware, or part of a computer program, engine, or module. When a system is said to be configured to perform one or more operations, this means that appropriate software, firmware, and / or hardware are installed on the system that, when in operation, causes the system to perform one or more operations. When hardware is said to be configured to perform one or more operations, this means that the hardware includes one or more circuits that, when in operation, receive input and generate output based on the input and corresponding to one or more operations. When a computer program, engine, or module is said to be configured to perform one or more operations, this means that the computer program includes one or more program instructions that, when executed by one or more computers, cause those computers to perform one or more operations.

[0080] Although the operations shown in the accompanying drawings and described in the claims are presented in a specific order, it should be understood that the operations may be performed in a different order than shown, and some operations may be omitted, performed more than once, and / or performed in parallel with other operations. Furthermore, the separation of different system components configured to perform different operations should not be construed as requiring component separation. The described components, modules, programs, and engines may be integrated together as a single system or as part of multiple systems.

[0081] Unless otherwise stated, the foregoing alternative examples are not mutually exclusive, but can be implemented in various combinations to achieve unique advantages. Since these and other variations and combinations of the features discussed above can be utilized without departing from the subject matter defined by the claims, the preceding description of the embodiments should be done by way of illustration rather than by way of limiting the subject matter defined by the claims. Furthermore, the examples provided herein, and terms expressed as "such as," "comprising," etc., should not be construed as limiting the subject matter of the claims to the specific examples; rather, the examples are intended to illustrate only one of many possible embodiments. Moreover, the same reference numerals in different figures may identify the same or similar elements.

Claims

1. A method, characterized in that, include: One or more processors receive queries for data maintained in a column-store database; The one or more processors generate a row-stored expression tree representing the query, the row-stored expression tree including one or more row-stored operators for performing operations on the row-stored database; The one or more processors generate a mapping between the one or more row storage operators and the corresponding column storage results used to execute the row storage operators, without rewriting the row storage expression tree into column storage format; as well as In response to the mapping, the one or more processors retrieve at least a portion of one or more rows for the query, the one or more rows including columnstore data from the columnstore database.

2. The method according to claim 1, characterized in that, in, The mapping includes a mapping between the memory address of each of the one or more row storage operators and the corresponding memory address used to store the corresponding column storage result.

3. The method according to claim 1, characterized in that, in, Generating the mapping involves launching a virtual machine configured to maintain the mapping.

4. The method according to claim 1, characterized in that, It also includes accessing column values ​​by at least partially executing row storage operators in the row storage expression tree, wherein accessing the column values ​​includes returning values ​​from the column storage database.

5. The method according to claim 1, characterized in that, It also includes row-stored function operators that execute one or more row-stored operators in the row-stored expression tree and target column values.

6. The method according to claim 5, characterized in that, It also includes performing the corresponding column storage function operator on the column that includes the column value.

7. The method according to claim 1, characterized in that, It also includes storing intermediate results generated by executing the one or more row storage operators in one or more virtual columns.

8. A system, characterized in that, include: One or more processors; as well as One or more storage devices coupled to and storing instructions that, when executed by the one or more processors, cause the one or more processors to perform operations, the operations including: Receive queries for data maintained in a columnstore database; Generate a row-stored expression tree representing the query, the row-stored expression tree including one or more row-stored operators for performing operations on the row-stored database; Generate a mapping between the one or more row-stored operators and their corresponding column-stored results for executing the row-stored operators, without rewriting the row-stored expression tree to column-stored format; and In response to the mapping, at least a portion of one or more rows for the query is retrieved, the one or more rows including columnstore data from the columnstore database.

9. The system according to claim 8, characterized in that, in, The mapping includes a mapping between the memory address of each of the one or more row storage operators and the corresponding memory address used to store the corresponding column storage result.

10. The system according to claim 9, characterized in that, in, Generating the mapping involves launching a virtual machine configured to maintain the mapping.

11. The system according to claim 8, characterized in that, in, The operation also includes accessing column values ​​by at least partially executing row storage operators in the row storage expression tree, wherein accessing the column values ​​includes returning values ​​from the column storage database.

12. The system according to claim 8, characterized in that, in, The operation also includes executing row-stored function operators of the one or more row-stored operators in the row-stored expression tree, with column values ​​as the target.

13. The system according to claim 12, characterized in that, in, The operation also includes executing the corresponding column storage function operator on the column that includes the column value.

14. The system according to claim 8, characterized in that, in, The operation also includes storing intermediate results generated by executing the one or more row storage operators in one or more virtual columns.

15. A non-transitory computer-readable medium, characterized in that, The non-transitory computer-readable medium is used to store instructions that, when executed by one or more processors, cause the one or more processors to perform operations, the operations including: Receive queries for data maintained in a columnstore database; Generate a row-stored expression tree representing the query, the row-stored expression tree including one or more row-stored operators for performing operations on the row-stored database; Generate a mapping between the one or more row-stored operators and their corresponding column-stored results for executing the row-stored operators, without rewriting the row-stored expression tree to column-stored format; and In response to the mapping, at least a portion of one or more rows for the query is retrieved, the one or more rows including columnstore data from the columnstore database.

16. The non-transitory computer-readable medium according to claim 15, characterized in that, in, The mapping includes a mapping between the memory address of each of the one or more row storage operators and the corresponding memory address used to store the corresponding column storage result.

17. The non-transitory computer-readable medium according to claim 16, characterized in that, in, Generating the mapping involves launching a virtual machine configured to maintain the mapping.

18. The non-transitory computer-readable medium according to claim 15, characterized in that, in, The operation also includes accessing column values ​​by at least partially executing row storage operators in the row storage expression tree, wherein accessing the column values ​​includes returning values ​​from the column storage database.

19. The non-transitory computer-readable medium according to claim 15, characterized in that, in, The operation also includes: Execute the row storage function operator of the one or more row storage operators in the row storage expression tree and target the column value; and Execute the corresponding column storage function operator on the column that includes the column value.

20. The non-transitory computer-readable medium according to claim 15, characterized in that, in, The operation also includes storing intermediate results generated by executing the one or more row storage operators in one or more virtual columns.

Citation Information

Patent Citations

  • Methods, systems, and computer-readable media for providing a query layer for cloud databases

    US20130132371A1