1. A method comprising: transforming a first query, comprising a first lateral view that includes a first predicate that references a database object that is joined with the first lateral view, to a second query that includes: a second view without the first predicate that references the database object, wherein the database object is joined with the second view, and a second predicate outside the second view, wherein the second predicate corresponds to the first predicate, wherein the second predicate references the second view, and wherein the second query is semantically equivalent to the first query; causing execution of the second query instead of the first query; wherein the method is performed by one or more computing devices.
1. A method comprising: transforming a first query, comprising a first lateral view that includes a first predicate that references a database object that is joined with the first lateral view, to a second query that includes: a second view without the first predicate that references the database object, wherein the database object is joined with the second view, and a second predicate outside the second view, wherein the second predicate corresponds to the first predicate, wherein the second predicate references the second view, and wherein the second query is semantically equivalent to the first query; causing execution of the second query instead of the first query; wherein the method is performed by one or more computing devices. 4. The method of claim 1 , wherein the first lateral view includes a plurality of correlated predicates, including the first predicate, and wherein the second view does not include any of the correlated predicates.