Skip to content

Commit

Permalink
executor: check schema when build table reader executor (#50425) (#50562
Browse files Browse the repository at this point in the history
)

ref #50358
  • Loading branch information
ti-chi-bot authored Apr 16, 2024
1 parent 5bf91c6 commit 3c1af38
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions executor/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -3571,6 +3571,10 @@ func (b *executorBuilder) buildTableReader(v *plannercore.PhysicalTableReader) E
}
})
if useMPPExecution(b.ctx, v) {
// https://github.com/pingcap/tidb/issues/50358
if len(v.Schema().Columns) == 0 && len(v.GetTablePlan().Schema().Columns) > 0 {
v.SetSchema(v.GetTablePlan().Schema())
}
return b.buildMPPGather(v)
}
ts, err := v.GetTableScan()
Expand Down

0 comments on commit 3c1af38

Please sign in to comment.