Skip to content

Commit

Permalink
planner: make sure mpp join task's hashCols are all contained of its …
Browse files Browse the repository at this point in the history
…plan's schema (pingcap#52836) (pingcap#55655)

close pingcap#42587
  • Loading branch information
ti-chi-bot authored Aug 26, 2024
1 parent 1bcb954 commit e0cf097
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion planner/core/rule_eliminate_projection.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,11 @@ func doPhysicalProjectionElimination(p PhysicalPlan) PhysicalPlan {
}
child := p.Children()[0]
if childProj, ok := child.(*PhysicalProjection); ok {
childProj.SetSchema(p.Schema())
// when current projection is an empty projection(schema pruned by column pruner), no need to reset child's schema
// TODO: avoid producing empty projection in column pruner.
if p.Schema().Len() != 0 {
childProj.SetSchema(p.Schema())
}
}
return child
}
Expand Down

0 comments on commit e0cf097

Please sign in to comment.