You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: datafusion/optimizer/src/decorrelate.rs
+10-3Lines changed: 10 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,8 @@
15
15
// specific language governing permissions and limitations
16
16
// under the License.
17
17
18
+
//! [`PullUpCorrelatedExpr`] converts correlated subqueries to `Joins`
19
+
18
20
use std::collections::{BTreeSet,HashMap};
19
21
use std::ops::Deref;
20
22
@@ -31,8 +33,11 @@ use datafusion_expr::utils::{conjunction, find_join_exprs, split_conjunction};
31
33
use datafusion_expr::{expr,EmptyRelation,Expr,LogicalPlan,LogicalPlanBuilder};
32
34
use datafusion_physical_expr::execution_props::ExecutionProps;
33
35
34
-
/// This struct rewrite the sub query plan by pull up the correlated expressions(contains outer reference columns) from the inner subquery's 'Filter'.
35
-
/// It adds the inner reference columns to the 'Projection' or 'Aggregate' of the subquery if they are missing, so that they can be evaluated by the parent operator as the join condition.
36
+
/// This struct rewrite the sub query plan by pull up the correlated
37
+
/// expressions(contains outer reference columns) from the inner subquery's
38
+
/// 'Filter'. It adds the inner reference columns to the 'Projection' or
39
+
/// 'Aggregate' of the subquery if they are missing, so that they can be
40
+
/// evaluated by the parent operator as the join condition.
36
41
pubstructPullUpCorrelatedExpr{
37
42
pubjoin_filters:Vec<Expr>,
38
43
// mapping from the plan to its holding correlated columns
/// Mapping from expr display name to its evaluation result on empty record batch (for example: 'count(*)' is 'ScalarValue(0)', 'count(*) + 2' is 'ScalarValue(2)')
62
+
/// Mapping from expr display name to its evaluation result on empty record
63
+
/// batch (for example: 'count(*)' is 'ScalarValue(0)', 'count(*) + 2' is
0 commit comments