|
|---|
A query tree is a tree structure that corresponds to a query by having zero input operators (e.g. GET) as leaf nodes of the tree (representing the access of a stored relation) and arity one or more operators as internal nodes. An evaluation of the query tree consists of evaluating an internal node operation whenever its operands are available and the replacing that internal node by the table that results from evaluating the operation. The evaluation terminates when the root node is evaluated and replaced by the table that is the result of the query.
|
|---|
Notice that the table represented by this query tree could be actually be represented by many different trees.SELECT * FROM CUSTOMER AS C, ORDER AS O, LINEITEM AS L WHERE C.C_CUSTKEY = O.O_CUSTKEY AND O.O_ORDERKEY = L.L_ORDERKEY;
|
|---|
contains an arbitrary number of operators. Cascades expressions specify only the last operation to be performed, without specifying how the inputs (groups) of the expression are to be computed.OOK (
CM="Building" CUSTOMER |
| ORDER)
operator inputs: EQJOIN 0 3 (expression 1) EQJOIN 3 0 (expression 2)Note that the inputs 0 and 3 above are designations (group numbers) for the groups representing the intermediate tables generated by the GET logical operator for the Customer and Lineitem stored relations, respectively. So group 0 would contain the the logical expression: GET 'CUSTOMER as C'.
|
|---|
|
|---|
|
|---|
The "O.OCK" in the equality conditions parameter of the EQJOIN operator, refers to an attribute in the schema for the table corresponding to group 6, as a result of the expressionEQJOIN 6 0 'O.OCK = C.CCK'
GET 'Order as O'
|
|---|
physical operator: inputs: parameters: MERGE_JOIN 1 0 'O.OCK = C.CCK'where 1 and 0 are group numbers representing tables (i.e. groups) (whose schema must contain attributes C.CCK and O.OCK, respectively).
|
|---|
|
|---|
|
|---|
|
|---|
|
|---|