Closed jackwener closed 2 years ago
@jackwener: The label(s) sig-planner
cannot be applied. These labels are supported: challenge-program, compatibility-breaker, first-time-contributor, contribution, require-LGT3, good first issue, correctness, duplicate, proposal, security, needs-more-info, needs-cherry-pick-3.0, needs-cherry-pick-3.1, needs-cherry-pick-4.0, needs-cherry-pick-5.0, needs-cherry-pick-5.1, needs-cherry-pick-5.2, affects-4.0, affects-5.0, affects-5.1, affects-5.2, backport-4.0.14, backport-4.0.15, backport-5.0.3, backport-5.0.4, backport-5.1.0, backport-5.1.1, backport-5.1.2
.
/label challenge-program /label sig/planner
@jackwener: The label(s) sig/planner
cannot be applied. These labels are supported: challenge-program, compatibility-breaker, first-time-contributor, contribution, require-LGT3, good first issue, correctness, duplicate, proposal, security, needs-more-info, needs-cherry-pick-3.0, needs-cherry-pick-3.1, needs-cherry-pick-4.0, needs-cherry-pick-5.0, needs-cherry-pick-5.1, needs-cherry-pick-5.2, affects-4.0, affects-5.0, affects-5.1, affects-5.2, backport-4.0.14, backport-4.0.15, backport-5.0.3, backport-5.0.4, backport-5.1.0, backport-5.1.1, backport-5.1.2
.
@jackwener: The label(s) sig-planner
cannot be applied. These labels are supported: challenge-program, compatibility-breaker, first-time-contributor, contribution, require-LGT3, good first issue, correctness, duplicate, proposal, security, needs-more-info, needs-cherry-pick-3.0, needs-cherry-pick-3.1, needs-cherry-pick-4.0, needs-cherry-pick-5.0, needs-cherry-pick-5.1, needs-cherry-pick-5.2, affects-4.0, affects-5.0, affects-5.1, affects-5.2, backport-4.0.14, backport-4.0.15, backport-5.0.3, backport-5.0.4, backport-5.1.0, backport-5.1.1, backport-5.1.2
.
/label sig/planner
@jackwener: The label(s) sig/planner
cannot be applied. These labels are supported: challenge-program, compatibility-breaker, first-time-contributor, contribution, require-LGT3, good first issue, correctness, duplicate, proposal, security, needs-more-info, needs-cherry-pick-3.0, needs-cherry-pick-3.1, needs-cherry-pick-4.0, needs-cherry-pick-5.0, needs-cherry-pick-5.1, needs-cherry-pick-5.2, affects-4.0, affects-5.0, affects-5.1, affects-5.2, backport-4.0.14, backport-4.0.15, backport-5.0.3, backport-5.0.4, backport-5.1.0, backport-5.1.1, backport-5.1.2
.
I have some questions. Why is in plan building phase
in the task description?
builder.Build(ctx, node)
is used for both plan.core
and cascades plan
.
Perhaps this task works on both plans and not just for cascades plan
?
What's more, if it's implemented in planBuilder
, subquery will be handle both in planBuilder
and optimizer in plan.core
Enhancement
Related issue: #13709
Example
Scalar Subquery
rewrite to
Subquery Within the IN Clause
rewrite to
Subquery in the Clause NOT IN
rewrite to
Correlated Subqueries in EXISTS and in NOT EXISTS
rewrite to