Skip to content

Commit 4065837

Browse files
dash12653ti-chi-bot
authored andcommitted
This is an automated cherry-pick of pingcap#54334
Signed-off-by: ti-chi-bot <[email protected]>
1 parent 5e39597 commit 4065837

File tree

3 files changed

+1230
-0
lines changed

3 files changed

+1230
-0
lines changed

planner/core/expression_rewriter.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,11 @@ func (er *expressionRewriter) handleInSubquery(ctx context.Context, v *ast.Patte
10171017
copy(join.names, er.p.OutputNames())
10181018
copy(join.names[er.p.Schema().Len():], agg.OutputNames())
10191019
join.AttachOnConds(expression.SplitCNFItems(checkCondition))
1020+
// set FullSchema and FullNames for this join
1021+
if left, ok := planCtx.plan.(*logicalop.LogicalJoin); ok && left.FullSchema != nil {
1022+
join.FullSchema = left.FullSchema
1023+
join.FullNames = left.FullNames
1024+
}
10201025
// Set join hint for this join.
10211026
if er.b.TableHints() != nil {
10221027
join.setPreferredJoinTypeAndOrder(er.b.TableHints())

0 commit comments

Comments
 (0)