Evaluating row store expressions on column store database

By locally executing the row storage expression data structure on the column storage database, the problem of being unable to directly execute the row storage expression tree in the existing technology is solved, and efficient expression processing and query performance improvement are achieved.

CN118829977AActive Publication Date: 2024-10-22GOOGLE LLC
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing database management systems (DBMS) cannot directly execute row storage expression trees on column storage databases, and the expression trees need to be rewritten to adapt to the column storage format, resulting in low efficiency.

Method used

By executing the row storage expression data structure locally on the column storage database, maintaining the address mapping of the row storage results to the corresponding column data, and using the interceptor virtual machine to take the column data as input, avoiding rewriting the expression tree, directly in the column data Execute the row storage operator on

Benefits of technology

It eliminates the need to rewrite expression trees for columnar data, improves the efficiency and flexibility of expression processing, supports the direct application of row storage expression trees to column storage databases, and improves query performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118829977A_ABST
    Figure CN118829977A_ABST
Patent Text Reader

Abstract

Aspects of the present disclosure provide for executing a row store expression data structure locally on a column store database without rewriting. A database management system (DBMS) configured as described herein may maintain a mapping of row storage results to an address at which corresponding column data is stored. When executing operators such as logical operators, comparison operators and / or function operators of received query expressions, the DBMS may operate on column data rather than on separate rows. The DBMS may store results generated by executing the column operators, for example, on a stack, and record row storage addresses corresponding to the stored results. The DBMS responds with a plurality of 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 on February 10, 2023, which claims the benefit of the filing date of U.S. Provisional Patent Application No. 63 / 340,234 filed on May 10, 2022, and the disclosures of the U.S. patent application and the U.S. Provisional Patent Application are hereby incorporated herein by reference. Background Art

[0003] A database management system (DBMS) is a system for managing one or more databases and for receiving and resolving queries against the managed databases. A DBMS can manage one or more tables or relations of data stored on one or more storage devices and forming part of one or more managed databases. A DBMS can read and write individual rows or columns of managed tables, including updating, deleting, and adding records.

[0004] A DBMS may store data blocks representing tables of a database. The database may be a row-store database, in which expression trees representing the operations of a received query are evaluated row by row by the DBMS, and data is stored row by row so that the first column of a row will be next to the last column of the previous row. In a column-store database, expression trees are evaluated column by column, and data is stored so that each row of a column will be next to other rows in the same column. Expression trees generated for a row-store database cannot be processed by a DBMS for a column-store database, and vice versa. For example, a row-store expression tree accesses the values ​​of columns within a single row when executed, rather than the values ​​of columns of multiple rows. Therefore, a row-store expression tree cannot be used as a drop-in option for a column-store database. Therefore, a DBMS for a column-store database rewrites the expression tree to handle columnar data. Summary of the invention

[0005] Aspects of the present disclosure provide for executing row storage expression data structures locally on a column storage database without rewriting the expression data structure. A database management system (DBMS) configured as described herein can maintain a mapping of row storage results to addresses where corresponding column data is stored. When executing operators such as logical operators, comparison operators, and / or function operators of a received query expression, the DBMS can operate on column data rather than on separate rows. The DBMS can store the results generated by executing the 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] Aspects of the present disclosure include a method comprising: receiving, by one or more processors, a query for data maintained in a column store database; generating, by one or more processors, an expression tree representing the received query, the expression tree comprising one or more row store operators for performing operations on the row store database; and retrieving, by the one or more processors and using the expression tree, in response to the received query, at least a portion of one or more rows comprising column store data from the column store database.

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

[0008] In some examples, retrieving at least a portion of one or more rows includes generating a mapping between a memory address of a target address of each of one or more row store operators and a corresponding target address for storing a corresponding column store result for executing the row store operator.

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

[0010] In some examples, retrieving at least a portion of the one or more rows may include accessing a column value by at least partially executing a row store operator in an expression tree, wherein accessing the column value includes returning a value in a column store database.

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

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

[0013] Aspects of the present disclosure include a system comprising one or more processors configured to perform one or more methods disclosed herein.

[0014] Aspects of the present disclosure include one or more non-transitory computer-readable storage media encoding instructions that, when executed by one or more processors, cause the one or more processors to perform one or more methods described herein. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 is a block diagram of an example database management system (DBMS) configured to execute rowstore expression trees on columnstore data according to aspects of the present disclosure.

[0016] Figure 2 is a block diagram of a column cache having cached data according to aspects of the present disclosure.

[0017] Figure 3A is a diagram of an example row storage expression tree according to aspects of the present disclosure.

[0018] Figure 3B is a diagram of an example evaluation of a rowstore expression tree on a columnstore database according to aspects of the present disclosure.

[0019] Figure 4 is a flow chart of an example process for evaluating a rowstore expression tree on a columnstore database according to aspects of the present disclosure.

[0020] Figure 5 is a block diagram of an example computing environment that implements a DBMS according to aspects of the present disclosure. DETAILED DESCRIPTION

[0021] In the database, expression trees can be used to evaluate predicates, projections, and aggregate expressions for a query. In a rowstore database, expression trees for a query or other input are evaluated row by row and are not available for a columnstore database. Columnstore databases rewrite expression trees to handle columnar data. For a columnstore database, there is no plug-and-play option to use expression trees generated for rowstore data. The plug-and-play option can refer to the ability of a DBMS that manages a columnstore database to implement features managed by a rowstore database without modifying the implementation of the features to account for the differences between rowstore and columnstore databases.

[0022] Aspects of the present disclosure provide for executing row storage expression data structures locally on a column storage database without rewriting the expression data structures into a column storage format. A database management system (DBMS) may maintain a mapping of row storage results to addresses where corresponding column data is stored. When executing operators such as logical operators, comparison operators, and / or function operators of a received query expression, the DBMS may operate on column data rather than on individual rows. The DBMS may store the results generated by executing the 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] Aspects of the present disclosure provide virtualization techniques for enabling execution of row-stored expression trees on column-stored data. An interceptor virtual machine (VM) may maintain a mapping of row-stored results of received expression trees to addresses where column data is stored in a column-stored database. Operators (e.g., logical operators, comparison operators, or function operators) for queries represented in expression trees are executed on 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-stored addresses.

[0024] When the DBMS executes an operator that requires input operands, the DBMS can provide the operands from the column data. The DBMS can look up the mapping of the row storage result and provide access to the corresponding column data. The DBMS generates a row storage 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 storage expression tree on the column data can be a result array. The value 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] Aspects of the present disclosure may provide at least the following advantages. The need to rewrite expression trees for columnar databases is eliminated. Existing row store expression services can be plugged into a DBMS that manages column store data without having to first rewrite the service to natively support column store data. In addition, improvements to row store expression tree generation and execution also have direct improvements to DBMSs based on column store data, at least because of the functionality and improvements extended from row store-based operators and column store data-based operators. Expression processing can be applied to a variety of different trees, including predicate, projection, and aggregate expression trees.

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

[0027] DBMS 100 may be configured to receive queries, such as query 108 from computing device 105, and resolve the queries by providing responses, such as query responses 112. Query responses 112 may include one or more rows or columns, or portions of one or more rows or columns, of one or more tables of database 130. Prior to providing query responses 112, DBMS 100 may optionally process the data, such as by aggregating and / or sorting the rows of the response. The operations of processing query responses 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] The computing device 105 can be any of a variety of computing devices configured to query a database. For example, the computing device 105 can be a personal laptop, a server, a wearable device, a sensor, etc. The computing device 105 can be user-operated and include peripherals or other components for receiving user input. In other examples, the computing device 105 can be configured to automatically communicate with the DBMS 100, for example, as part of the computing device 105 executing a computer program, script, or hardware / firmware operation. The DBMS 100 and the computing device 105 can communicate via a network and / or any of a variety of different types 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 a corresponding database managed by the OLTP system. An OLAP system is configured to receive and resolve queries to a database as part of an analysis of data stored in the database. OLAP systems and OLTP systems are optimized separately for their respective use cases, where OLAP systems are typically optimized for read-only access to data, while OLTP systems are optimized for read and write access to the queried data.

[0030] To improve the performance of query resolution, DBMS 100 may implement a column cache 110. Queries to OLAP systems and HTAP systems that support OLAP may include requests for data referenced by columns of tables in the database, rather than references to individual rows as is more common in OLTP. To speed up the resolution of queries by column, DBMS 100 may implement a column cache 110.

[0031] The column cache 110 may be implemented asynchronously, so sometimes the column cache 110 may contain stale data, such as invalid blocks. At least for some applications (such as HTAP systems), the DBMS 100 should answer queries 108 while accepting updates to base tables whose data is cached. The DBMS 100 can implement hybrid query execution to allow the use of asynchronous column caches by allowing the execution of queries 108 that retrieve data from both the column cache 110 and the database 130. It should be understood that the column data retrieved during the execution of the row store expression trees described herein can be retrieved from a combination of the column store database 130 and / or the column cache 110.

[0032] Figure 2 A block diagram of a column cache 110 having cached data is depicted. Figure 2 , the column cache 110 is shown as a cache portion of the database table 201. Columns 5, 15, 25, 35, and 45 in the column cache 110 can be referenced using 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 of 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 may be referred to as table fragments. The number of blocks in a table fragment may vary from implementation to implementation depending on performance and overhead requirements, such as 4096 blocks per fragment. It should be noted that the column cache 110 may include any number of rows, columns, blocks, table fragments, etc., and Figure 2 The numbers of elements shown are for illustrative purposes only.

[0033] Column cache 110 may include any of a variety of different types of memory devices for caching data. For example, column cache 110 may be implemented in main memory such as RAM or DRAM. Additionally or alternatively, column cache 110 may be implemented in persistent storage, such as on a solid state drive or hard 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 relations that store data along multiple dimensions. For example, a table of database 130 may store data along rows and columns of the table. Database 130 may be implemented on a storage device such as a direct attached storage device (including a solid state drive, a hard drive, a flash drive), a network attached storage device, an array of various combinations of different or identical storage devices, etc. Database 130 may be a column storage database.

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

[0036] A query 108 to DBMS 100 may include data specifying columns of data to be retrieved from DBMS 100. The specified data may be stored in column cache 110 or in 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 the 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 may generate a query execution plan according to any of a variety of different processes. As part of generating a query execution plan, planner 135 may parse the received query 108 and select corresponding query operations to execute according to the plan based on a plurality of predetermined criteria. For example, the 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 may receive and parse query 108 to generate a query execution plan.

[0038] Query operations may refer to actions 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 a memory, performing arithmetic or logical calculations, performing corresponding processes for sorting, hashing, joining, aggregating, and scanning data, etc. A query execution plan may be a directed graph of nodes, such as an expression evaluation tree, representing different operations to be performed by the DBMS 100 as part of executing a query 108. The query execution plan may also be represented as an ordered list or array of operations, the order being the order in which the operations of the plan must be performed 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 may be specified as a destination by the computing device 105. The computing device 105 may continue to process the query response 112 as part of a downstream process, which may include subsequent queries to the DBMS 100 as part of the same or a different workload.

[0040] DBMS 100 may transfer data between computing device 105 and / or another computing device (not shown) using an interface (such as a graphical user interface) displayed on a display of computing device 105. The interface may include a plurality of user-interactive elements, such as buttons, toggles, sliders, check boxes, 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 for modifying various parameters related to the functionality of DBMS 100, such as cache configuration, based on calls to the API.

[0041] Although reference is made to expression trees, it should be understood that other data structures may be substituted to represent operators and operands of expressions of varying complexity and 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 a JOIN operator for performing a table join to combine columns of selected tables to generate a new table. Columns may be specified by a JOIN condition, and the DBMS 100 is configured to recognize the JOIN condition in the query 108 to perform the join according to the condition specified in the query 108.

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

[0043] Figure 3A is a diagram of an example row storage expression tree 300A. Expression tree 300A includes three operators OP 1, OP 2, OP 3. 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. OP 1 can be executed using result 1 and result 2 to generate result 5. Similarly, value 3 and value 4 can be retrieved to form result 3 and result 4, respectively, and OP 2 can be executed using result 3 and result 4 to generate result 6. OP 3 can take result 5 and result 6 as input and generate result 7 as output.

[0044] Figure 3B is a diagram of an example evaluation 300B of a rowstore expression tree 300A on a columnstore database according to aspects of the present disclosure.

[0045] like Figure 3B As shown, result 1 and result 2 can be entire columns containing value 1 and value 2, respectively. Column storage operators Col OP1, Col OP 2, and Col OP 3 can be used with Figure 3A 1, OP 2, and OP 3 of the column storage operator equivalent. Similarly, result 3 and result 4 can be stored with Figure 3A Col OP 1 and Col OP 2 may be executed by DBMS 100, and corresponding Result 5 and Result 6 may be pushed onto a stack of interceptor VM 150. DBMS 100 may execute Col OP 3 corresponding to OP 3 and push Result 7 onto the stack. Result 1 to Result 7 may correspond to column data. DBMS 100 may execute a result iterator to generate results corresponding to row store expression tree 300A row by row.

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

[0047]

[0048]

[0049] Table 1

[0050] At step 1, the query execution engine reads the column values ​​targeted by the row storage operators in the expression tree into a memory location, such as a cache memory or other dedicated memory for evaluating expression trees. The interceptor VM 150 maps the memory location to a corresponding column storage address.

[0051] At step 2, the query execution engine 120 reads the column value from the memory location. The interceptor VM 150 may demap the memory location to retrieve the column address stored in step 1. The query execution engine 120 may store the corresponding column address in a location in memory (eg, virtual memory).

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

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

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

[0055] At step 6, in response to evaluating the expression tree, the result rows that meet the condition are returned. To this end, the interceptor VM 150 reads the top of the stack memory to obtain the result vector of the column data. The interceptor VM 150 constructs an iterator to return rows from the column data. The 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, as referenced FIG. 3A to FIG. 3B As shown and described, in step 7, the query execution engine 120 stores the sub-expression tree results into a memory location. The interceptor VM 150 may iterate steps 1 through 6 for as many sub-expression tree results as there are in the input expression tree. For expression trees without sub-expression trees (e.g., with a single operator), step 7 is omitted.

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

[0058] Figure 4 4 is a flow chart of an example process 400 for evaluating an expression generated for a row store database on a column store database. The example process 400 may be performed on a system of one or more processors in one or more locations, such as Figure 1 The example is executed on DBMS100).

[0059] According to block 410 , the DBMS 100 receives a query 108 for data maintained in a column store database 130 .

[0060] According to block 420, DBMS 100 generates an expression tree representing received query 108, the expression tree including 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 rather than generating the expression tree.

[0061] According to block 430 , the DBMS 100 uses the expression tree to retrieve at least a portion of one or more rows including column store data from the column store database 130 in response to the received query 108 .

[0062] As part of retrieving one or more rows or portions of one or more rows, DBMS 100 may generate a mapping between a memory address of a target address of each of one or more row store operators and a corresponding target address for storing a corresponding column store result for executing the row store operator.

[0063] As part of generating the map, DBMS 100 may launch a virtual machine that includes a stack memory, such as interceptor VM 150 as described herein. Interceptor VM 150 may be configured to maintain the map.

[0064] Retrieving at least a portion of the one or more rows includes accessing a column value by at least partially executing a row store operator in the expression tree, wherein accessing the column value includes returning a value in the column store database 130 .

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

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

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

[0068] The storage device 630 may be a combination of volatile and non-volatile memory and may be located in the same or a different physical location than the computing devices 612, 615. For example, the storage device 630 may include any type of non-transitory computer-readable medium capable of storing information, such as a hard drive, a solid-state drive, a tape drive, optical storage, a memory card, ROM, RAM, DVD, CD-ROM, writable memory, and read-only memory.

[0069] The server computing device 615 may include one or more processors 613 and memory 614. The memory 614 may store information accessible by the processor 613, including instructions 621 executable by the processor 613. The memory 614 may also include data 623 that may be retrieved, manipulated, or stored by the processor 613. The memory 614 may be a type of non-transitory computer-readable medium capable of storing information accessible by the processor 613, such as volatile memory and non-volatile memory. The 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] Instructions 621 may include one or more instructions that, when executed by processor 613, cause one or more processors to perform actions defined by instructions 621. Instructions 621 may be stored in an object code format for direct processing by processor 613, or in other formats, including interpretable scripts or independent source code module collections that are interpreted on demand or compiled in advance. Instructions 621 may include instructions for implementing DBMS 100 consistent with aspects of the present disclosure. DBMS 100 may be executed using processor 613 and / or using other processors located remotely from server computing device 615.

[0071] Data 623 may be retrieved, stored, or modified by processor 613 in accordance with instructions 621. Data 623 may be stored in a computer register, in a relational or non-relational database as a table with a plurality of different fields and records, or as a JSON, YAML, proto, or XML document. Data 623 may also be formatted in a computer-readable format such as, but not limited to, binary values, ASCII, or Unicode. In addition, data 623 may include information sufficient to identify the relevant information, such as a number, descriptive text, proprietary code, pointer, reference to data stored in other storage (including other network locations), or information used by a function to calculate the relevant data.

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

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

[0074] Although Figure 5 Processors 613, 616 and memories 614, 616 are shown as being within computing devices 615, 612, but the components described in this specification (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 in a read-only computer chip. Some or all of the instructions and data may be stored in a location that is physically away from processors 613, 616 but still accessible by processors 613, 616. For example, processors 613, 616 may include a collection of processors that can perform concurrent and / or sequential operations. Computing devices 615, 612 may each include one or more internal clocks that provide timing information, which may be used 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 expose 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 a neural network trained to perform a particular neural network task.

[0076] The computing devices 612, 615 may be capable of communicating directly and indirectly over the network 660. The devices 615, 612 may set up listening sockets that may accept initiated connections for sending and receiving information. The network 660 itself may include a variety of configurations and protocols, including the Internet, the World Wide Web, an intranet, a virtual private network, a wide area network, a local area network, and a private network using one or more company-proprietary communication protocols. The network 660 may support a variety of short-range and long-range connections. The short-range and long-range connections may be made over different bandwidths, such as those typically associated with 2.402 GHz to 2.480 GHz, usually associated with the 2.4 GHz and 5 GHz associated with communication protocols; or using multiple communication standards, such as for wireless broadband communication Additionally or alternatively, the network 660 may also support wired connections between the devices 612, 615, including through various types of Ethernet connections.

[0077] Although a single server computing device 615 and user computing device 612 are shown in FIG7 , it should be understood that aspects of the present disclosure may be implemented according to various different configurations and numbers of computing devices (including in the paradigm of sequential or parallel processing), or through a distributed network of multiple devices. In some implementations, aspects of the present disclosure may be performed on a single device and any combination thereof.

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

[0079] In this specification, the phrase "configured to" is used in different contexts related 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, it means that the system has appropriate software, firmware, and / or hardware installed on the system, which software, firmware, and / or hardware causes the system to perform one or more operations when in operation. When a piece of hardware is said to be configured to perform one or more operations, it means that the hardware includes one or more circuits that receive inputs when in operation and generate outputs based on the inputs and corresponding to the one or more operations. When a computer program, engine, or module is said to be configured to perform one or more operations, it means that the computer program includes one or more program instructions that, when executed by one or more computers, cause the one or more computers to perform one or more operations.

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

[0081] Unless otherwise stated, the aforementioned 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 previous description of the embodiments should be made by way of illustration rather than by way of limitation of the subject matter defined by the claims. In addition, the examples described herein, and clauses expressed as "such as", "including", etc., should not be interpreted as limiting the subject matter of the claims to specific examples; rather, the examples are intended to illustrate only one of many possible embodiments. In addition, the same reference numerals in different figures may identify the same or similar elements.

Claims

1. A method, It is characterized in that include: 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 comprising one or more row store operators for performing operations on a row store database; as well as In response to the query being received, at least a portion of one or more rows including column store data from the column store database are retrieved by the one or more processors and using the expression tree.

2. The method according to claim 1, It is characterized in that in, Retrieving at least a portion of the one or more rows includes generating a mapping between a memory address of a target address of each of the one or more row store operators and a respective target address for storing a corresponding column store result for executing the row store operator.

3. The method according to claim 2, It is characterized in that in, Generating the mapping includes launching a virtual machine including a stack memory, the virtual machine configured to maintain the mapping.

4. The method according to claim 1, It is characterized in that in, Retrieving at least a portion of the one or more rows includes accessing a column value by at least partially executing a row store operator in the expression tree, wherein accessing the column value includes returning a value in the column store database.

5. The method according to claim 1, It is characterized in that in, Retrieving at least a portion of the one or more rows includes executing a row store function operator of the one or more row store operators in the expression tree and targeting a column value.

6. The method according to claim 5, It is characterized in that in, Retrieving at least a portion of the one or more rows includes executing a corresponding column storage function operator on a column including the column value.

7. The method according to claim 1, It is characterized in that in, Retrieving at least a portion of the one or more rows includes storing intermediate results generated by executing the one or more row storage operators in one or more virtual columns.

8. A system, It is characterized in that include: one or more processors; as well as one or more storage devices coupled to the one or more processors and storing instructions that, when executed by the one or more processors, cause the one or more processors to perform operations comprising: receiving a query for data maintained in a column store database; generating an expression tree representing the received query, the expression tree comprising one or more row store operators for performing operations on a row store database; and In response to the query being received, at least a portion of one or more rows including column store data from the column store database are retrieved using the expression tree.

9. The system according to claim 8, It is characterized in that in, Retrieving at least a portion of the one or more rows includes generating a mapping between a memory address of a target address of each of the one or more row store operators and a respective target address for storing a corresponding column store result for executing the row store operator.

10. The system according to claim 9, It is characterized in that in, Generating the mapping includes launching a virtual machine including a stack memory, the virtual machine configured to maintain the mapping.

11. The system according to claim 8, It is characterized in that in, Retrieving at least a portion of the one or more rows includes accessing a column value by at least partially executing a row store operator in the expression tree, wherein accessing the column value includes returning a value in the column store database.

12. The system according to claim 8, It is characterized in that in, Retrieving at least a portion of the one or more rows includes executing a row store function operator of the one or more row store operators in the expression tree and targeting a column value.

13. The system according to claim 12, It is characterized in that in, Retrieving at least a portion of the one or more rows includes executing a corresponding column storage function operator on a column including the column value.

14. The system according to claim 8, It is characterized in that in, Retrieving at least a portion of the one or more rows 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, It is 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 comprising: receiving a query for data maintained in a column store database; generating an expression tree representing the received query, the expression tree comprising one or more row store operators for performing operations on a row store database; and In response to the query being received, at least a portion of one or more rows including column store data from the column store database are retrieved using the expression tree.

16. The non-transitory computer readable medium of claim 15, It is characterized in that in, Retrieving at least a portion of the one or more rows includes generating a mapping between a memory address of a target address of each of the one or more row store operators and a respective target address for storing a corresponding column store result for executing the row store operator.

17. The non-transitory computer readable medium of claim 16, It is characterized in that in, Generating the mapping includes launching a virtual machine including a stack memory, the virtual machine configured to maintain the mapping.

18. The non-transitory computer readable medium of claim 15, It is characterized in that in, Retrieving at least a portion of the one or more rows includes accessing a column value by at least partially executing a row store operator in the expression tree, wherein accessing the column value includes returning a value in the column store database.

19. The non-transitory computer readable medium of claim 15, It is characterized in that in, Retrieving at least a portion of the one or more rows includes: executing a row store function operator of the one or more row store operators in the expression tree and targeting a column value; and The corresponding column storage function operator is executed on the column including the column value.

20. The non-transitory computer readable medium of claim 15, It is characterized in that in, Retrieving at least a portion of the one or more rows includes storing intermediate results generated by executing the one or more row storage operators in one or more virtual columns.

Citation Information

Patent Citations

  • Line and column hybrid storage method of database system

    CN103440245A

  • Adaptive row-batch processing of database data

    US20110231389A1

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

    US20130132371A1

  • Systems, methods and data structures for efficient indexing and retrieval of temporal data, including temporal data representing a computing infrastructure

    US20200250188A1