Transforming a single-table join predicate into a pseudo-join predicate
First Claim
1. A method comprising:
- transforming a first query to a transformed query;
wherein the first query includes;
a first outer join of a first database object and a second database object, anda first join predicate that specifies a first condition of the first database object for the first outer join, wherein the first join predicate does not reference the second database object;
wherein the transformed query does not include the first join predicate but does include;
a second predicate that specifies a second condition of the first database object, wherein the second predicate references the second database object;
wherein the transformed query is semantically equivalent to the first query;
causing execution of the transformed query instead of the first query;
wherein the method is performed by one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods, computing devices, and computer-readable media are provided for transforming an initial query with a single-table outer join predicate to a second, semantically equivalent query that includes a multi-table predicate instead of the single-table outer join predicate. Because the second query does not include the single-table outer join predicate, the second query may be available for further transformations or optimization techniques, may produce a more efficient or otherwise different execution plan, or may be executed more efficiently or differently. The single-table outer join predicate may be in a full outer join ON clause of the initial query or nested in a left outer-joined LATERAL VIEW of the initial query. The multi-table predicate may be in a WHERE clause of the second query. Unlike the initial query, the second query allows use of a temporary organization of data from multiple tables for evaluation of multiple rows of the left outer join.
22 Citations
44 Claims
-
1. A method comprising:
-
transforming a first query to a transformed query; wherein the first query includes; a first outer join of a first database object and a second database object, and a first join predicate that specifies a first condition of the first database object for the first outer join, wherein the first join predicate does not reference the second database object; wherein the transformed query does not include the first join predicate but does include; a second predicate that specifies a second condition of the first database object, wherein the second predicate references the second database object; wherein the transformed query is semantically equivalent to the first query; causing execution of the transformed query instead of the first query; wherein the method is performed by one or more computing devices. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. One or more non-transitory computer-readable storage media storing instructions which, when executed by one or more computing devices, cause:
-
transforming a first query to a transformed query; wherein the first query includes; a first outer join of a first database object and a second database object, and a first join predicate that specifies a first condition of the first database object for the first outer join, wherein the first join predicate does not reference the second database object; wherein the transformed query does not include the first join predicate but does include; a second predicate that specifies a second condition of the first database object, wherein the second predicate references the second database object; wherein the transformed query is semantically equivalent to the first query; causing execution of the transformed query instead of the first query. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
-
-
23. A method comprising:
-
transforming a first query to a transformed query; wherein the first query includes; a first outer join of a first database object and a second database object, and a first join predicate that specifies a first condition of the first database object for the first outer join, wherein the first join predicate does not reference the second database object; wherein the transformed query does not include the first join predicate but does include; a second predicate that specifies a second condition of the first database object, wherein the second predicate references the second database object; wherein the transformed query is semantically equivalent to the first query; generating an execution plan for executing the transformed query instead of the first query; wherein the method is performed by one or more computing devices. - View Dependent Claims (24, 25, 26, 27, 28, 29, 30, 31, 32, 33)
-
-
34. One or more non-transitory computer-readable storage media storing instructions which, when executed by one or more computing devices, cause:
-
transforming a first query to a transformed query; wherein the first query includes; a first outer join of a first database object and a second database object, and a first join predicate that specifies a first condition of the first database object for the first outer join, wherein the first join predicate does not reference the second database object; wherein the transformed query does not include the first join predicate but does include; a second predicate that specifies a second condition of the first database object, wherein the second predicate references the second database object; wherein the transformed query is semantically equivalent to the first query; generating an execution plan for executing the transformed query instead of the first query. - View Dependent Claims (35, 36, 37, 38, 39, 40, 41, 42, 43, 44)
-
Specification