Mechanism for efficiently evaluating operator trees
First Claim
1. A method for processing XPath expressions, comprising the steps of:
- receiving an XPath expression, wherein the XPath expression is associated with a requested operation;
generating, based on said XPath expression, an operator tree of the XPath expression;
wherein the operator tree comprises nodes and links;
wherein a subset of the nodes represents operations to be performed;
wherein each link in a subset of the links between the nodes represents a flow of data between the operations that are represented by the nodes that are linked by said each link; and
storing the operator tree in volatile or non-volatile memory; and
applying one or more rules to the operator tree to generate data,wherein the data specifies operations which, when executed, cause a database server to perform at least a portion of the requested operation;
based on the operator tree, executing the requested operation;
wherein executing the requested operation includes;
beginning at leaf nodes of the operator tree, performing operations associated with the leaf nodes; and
passing results of operations up to parent nodes of the nodes that performed the operations;
wherein passing the results includes;
if the parent of a node associated with an operation is a filter, then passing results of the operation to the filter, wherein the filter filters the results with a predicate statement; and
if the parent of a node associated with an operation is an operator node, then passing results of the operation to the parent and executing the operation associated with the parent on said results.
1 Assignment
0 Petitions
Accused Products
Abstract
An XPath expression is converted into a tree-based representation where each node represents an operation to be performed and the links between nodes in the tree represent the flow of data between operations. The conversion may involve creating a parse tree for the XPath expression, and then converting the parse tree into an operator tree. The operator tree is constructed in such a way that execution of the XPath expression begins at the leaf nodes of the operator tree, and the results are then passed up the tree. After each node is executed, the results are either (1) passed to a filter that filters the results with a predicate statement or (2) passed to another node to be operated upon. This occurs until no nodes remain to be executed.
87 Citations
34 Claims
-
1. A method for processing XPath expressions, comprising the steps of:
-
receiving an XPath expression, wherein the XPath expression is associated with a requested operation; generating, based on said XPath expression, an operator tree of the XPath expression; wherein the operator tree comprises nodes and links; wherein a subset of the nodes represents operations to be performed; wherein each link in a subset of the links between the nodes represents a flow of data between the operations that are represented by the nodes that are linked by said each link; and storing the operator tree in volatile or non-volatile memory; and applying one or more rules to the operator tree to generate data, wherein the data specifies operations which, when executed, cause a database server to perform at least a portion of the requested operation; based on the operator tree, executing the requested operation; wherein executing the requested operation includes; beginning at leaf nodes of the operator tree, performing operations associated with the leaf nodes; and passing results of operations up to parent nodes of the nodes that performed the operations; wherein passing the results includes; if the parent of a node associated with an operation is a filter, then passing results of the operation to the filter, wherein the filter filters the results with a predicate statement; and if the parent of a node associated with an operation is an operator node, then passing results of the operation to the parent and executing the operation associated with the parent on said results. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method for processing XPath expressions, comprising the steps of:
-
receiving an XPath expression, wherein the XPath expression is associated with a requested operation; creating a parse tree for the XPath expression; converting the parse tree into an operator tree; wherein converting the parse tree into the operator tree includes at least one of; converting an axis in the parse tree into a corresponding operator in the operator tree, or converting a pre-defined function in the parse tree into a corresponding operator in the operator tree; wherein the operator tree comprises nodes and links; wherein at least a subset of the nodes are nodes that represent operations to be performed; wherein each link in at least a subset of the links between the nodes represents a flow of data between the operations that are represented by the nodes that are linked by said each link; and storing the operator tree in volatile or non-volatile memory. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16, 17)
-
-
18. A machine-readable storage medium storing instructions for processing XPath expressions, wherein the instructions, when executed by one or more processors, causes the one or more processors to perform the steps of:
-
receiving an XPath expression, wherein the XPath expression is associated with a requested operation; generating, based on said XPath expression, an operator tree of the XPath expression; wherein the operator tree comprises nodes and links; wherein a subset of the nodes represents operations to be performed; wherein each link in a subset of the links between the nodes represents a flow of data between the operations that are represented by the nodes that are linked by said each link; and storing the operator tree in volatile or non-volatile memory; and applying one or more rules to the operator tree to generate, wherein the data specifies operations which, when executed, cause a database server to perform at least a portion of the requested operation; based on the operator tree, executing the requested operation; wherein executing the requested operation includes; beginning at leaf nodes of the operator tree, performing operations associated with the leaf nodes; and passing results of operations up to parent nodes of the nodes that performed the operations; wherein passing the results includes; if the parent of a node associated with an operation is a filter, then passing results of the operation to the filter, wherein the filter filters the results with a predicate statement; and if the parent of a node associated with an operation is an operator node, then passing results of the operation to the parent and executing the operation associated with the parent on said results. - View Dependent Claims (19, 20, 21, 22, 23, 24, 25)
-
-
26. A machine-readable storage medium storing instructions for processing XPath expressions, wherein the instructions, when executed by one or more processors, cause the one or more processors to perform the steps of:
-
receiving an XPath expression, wherein the XPath expression is associated with a requested operation; creating a parse tree for the XPath expression; converting the parse tree into an operator tree; wherein converting the parse tree into the operator tree includes at least one of; converting an axis in the parse tree into a corresponding operator in the operator tree, or converting a pre-defined function in the parse tree into a corresponding operator in the operator tree; wherein the operator tree comprises nodes and links; wherein at least a subset of the nodes are nodes that represent operations to be performed; wherein each link in at least a subset of the links between the nodes represents a flow of data between the operations that are represented by the nodes that are linked by said each link; and storing the operator tree in volatile or non-volatile memory. - View Dependent Claims (27, 28, 29, 30, 31, 32, 33, 34)
-
Specification