Skip to content

Commit

Permalink
executor: Fix push downed topN won't replace correlated column problem (
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored May 10, 2024
1 parent d1e3dee commit d917e21
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions executor/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -3128,6 +3128,12 @@ func (b *executorBuilder) corColInDistPlan(plans []plannercore.PhysicalPlan) boo
return true
}
}
case *plannercore.PhysicalTopN:
for _, byItem := range x.ByItems {
if len(expression.ExtractCorColumns(byItem.Expr)) > 0 {
return true
}
}
case *plannercore.PhysicalTableScan:
for _, cond := range x.LateMaterializationFilterCondition {
if len(expression.ExtractCorColumns(cond)) > 0 {
Expand Down

0 comments on commit d917e21

Please sign in to comment.