Query language distribution heuristics
First Claim
Patent Images
1. A system comprising:
- one or more processors and one or more storage devices storing computer-executable instructions, when executed by the one or more processors, the computer-executable instructions cause the one or more processors to perform operations comprising;
receiving an original expression for a data processing query, the original expression having a conjunction joining a plurality of terms, wherein the plurality of terms comprises a context term as one term and a disjunction of a plurality of other terms as another term;
evaluating the context term and the disjunction according to one or more local distribution heuristics to determine that the context term is a candidate for distribution across the plurality of other terms of the disjunction, the evaluating the context term and the disjunction comprising;
determining whether the context term includes a single free variable, a free variable being a variable that does not relate to other variables in the context term;
in response to a determination that the context term includes a single free variable, determining whether each of the plurality of other terms of the disjunction also includes the single free variable; and
in response to a determination that each of the plurality of other terms of the disjunction also includes the single free variable, determining that the context term is a candidate for distribution across the plurality of other terms of the disjunction;
in response, generating a first transformed expression in which the candidate context term is distributed across the plurality of other terms of the disjunction;
determining, based on one or more deletion heuristics, whether the distributed candidate context term can be safely deleted from context outside of the disjunction of the first transformed expression;
in response to a determination that the distributed candidate context term can be safely deleted from context outside of the disjunction of the first transformed expression, determining that the distributed candidate context term is a deletion candidate;
generating a second transformed expression by deleting the deletion candidate from the context outside of the disjunction of the first transformed expression; and
executing the second transformed expression to generate a data processing query result for the original expression, wherein the second transformed expression reduces repetition of terms that are to be evaluated individually in the original expression.
3 Assignments
0 Petitions
Accused Products
Abstract
Methods, systems, and apparatus, including computer programs encoded on computer storage media, for performing local distribution heuristics. One of the methods includes receiving an original expression having a conjunction comprising a context term and a disjunction of a plurality of other terms. The context term and the disjunction are evaluated according to one or more local distribution heuristics to determine that the context term is a candidate for distribution across the disjunction of the plurality of other terms. In response, a transformed expression is generated in which the candidate context term is distributed across the disjunction of the plurality of other terms.
-
Citations
20 Claims
-
1. A system comprising:
one or more processors and one or more storage devices storing computer-executable instructions, when executed by the one or more processors, the computer-executable instructions cause the one or more processors to perform operations comprising; receiving an original expression for a data processing query, the original expression having a conjunction joining a plurality of terms, wherein the plurality of terms comprises a context term as one term and a disjunction of a plurality of other terms as another term; evaluating the context term and the disjunction according to one or more local distribution heuristics to determine that the context term is a candidate for distribution across the plurality of other terms of the disjunction, the evaluating the context term and the disjunction comprising; determining whether the context term includes a single free variable, a free variable being a variable that does not relate to other variables in the context term; in response to a determination that the context term includes a single free variable, determining whether each of the plurality of other terms of the disjunction also includes the single free variable; and in response to a determination that each of the plurality of other terms of the disjunction also includes the single free variable, determining that the context term is a candidate for distribution across the plurality of other terms of the disjunction; in response, generating a first transformed expression in which the candidate context term is distributed across the plurality of other terms of the disjunction; determining, based on one or more deletion heuristics, whether the distributed candidate context term can be safely deleted from context outside of the disjunction of the first transformed expression; in response to a determination that the distributed candidate context term can be safely deleted from context outside of the disjunction of the first transformed expression, determining that the distributed candidate context term is a deletion candidate; generating a second transformed expression by deleting the deletion candidate from the context outside of the disjunction of the first transformed expression; and executing the second transformed expression to generate a data processing query result for the original expression, wherein the second transformed expression reduces repetition of terms that are to be evaluated individually in the original expression. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
15. A computer-implemented method comprising:
-
receiving an original expression for a data processing query, the original expression having a conjunction joining a plurality of terms, wherein the plurality of terms comprises a context term as one term and a disjunction of a plurality of other terms as another term; evaluating the context term and the disjunction according to one or more local distribution heuristics to determine that the context term is a candidate for distribution across the plurality of other terms of the disjunction, the evaluating the context term and the disjunction comprising; determining whether the context term includes a single free variable, a free variable being a variable that does not relate to other variables in the context term; in response to a determination that the context term includes a single free variable, determining whether each of the plurality of other terms of the disjunction also includes the single free variable; and in response to a determination that each of the plurality of other terms of the disjunction also includes the single free variable, determining that the context term is a candidate for distribution across the plurality of other terms of the disjunction; in response, generating a first transformed expression in which the candidate context term is distributed across the plurality of other terms of the disjunction; determining, based on one or more deletion heuristics, whether the distributed candidate context term can be safely deleted from context outside of the disjunction of the first transformed expression; in response to a determination that the distributed candidate context term can be safely deleted from context outside of the disjunction of the first transformed expression, determining that the distributed candidate context term is a deletion candidate; generating a second transformed expression by deleting the deletion candidate from the context outside of the disjunction of the first transformed expression; and executing the second transformed expression to generate a data processing query result for the original expression, wherein the second transformed expression reduces repetition of terms that are to be evaluated individually in the original expression. - View Dependent Claims (16, 17)
-
-
18. A computer program product comprising one or more hardware storage devices having stored thereon computer-executable instructions that are structured such that, when executed by one or more processors of a computing system cause the one or more processors to perform operations comprising:
-
receiving an original expression for a data processing query, the original expression having a conjunction of a plurality of terms, wherein the plurality of terms comprises a context term as one term and a disjunction of a plurality of other terms as another term; evaluating the context term and the disjunction according to one or more local distribution heuristics to determine that the context term is a candidate for distribution across the plurality of other terms of the disjunction, the evaluating the context term and the disjunction comprising; determining whether the context term includes a single free variable, a free variable being a variable that does not relate to other variables in the context term; in response to a determination that the context term includes a single free variable, determining whether each of the plurality of other terms of the disjunction also includes the single free variable; and in response to a determination that each of the plurality of other terms of the disjunction also includes the single free variable, determining that the context term is a candidate for distribution across the plurality of other terms of the disjunction; in response, generating a first transformed expression in which the candidate context term is distributed across the plurality of other terms of the disjunction; determining, based on one or more deletion heuristics, whether the distributed candidate context term can be safely deleted from context outside of the disjunction of the first transformed expression; in response to a determination that the distributed candidate context term can be safely deleted from context outside of the disjunction of the first transformed expression, determining that the distributed candidate context term is a deletion candidate; generating a second transformed expression by deleting the deletion candidate from the context outside of the disjunction of the first transformed expression; and executing the second transformed expression to generate a data processing query result for the original expression, wherein the second transformed expression reduces repetition of terms that are to be evaluated individually in the original expression. - View Dependent Claims (19, 20)
-
Specification