Skip to content

Commit

Permalink
fix null mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
hanfei1991 committed May 23, 2021
1 parent 5a7ac26 commit 9d2a178
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions planner/core/logical_plan_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -1348,6 +1348,10 @@ func (b *PlanBuilder) buildProjection4Union(ctx context.Context, u *LogicalUnion
b.optFlag |= flagEliminateProjection
proj := LogicalProjection{Exprs: exprs, AvoidColumnEvaluator: true}.Init(b.ctx, b.getSelectOffset())
proj.SetSchema(u.schema.Clone())
// reset the schema type to make the "not null" flag right.
for i, expr := range exprs {
proj.schema.Columns[i].RetType = expr.GetType()
}
proj.SetChildren(child)
u.children[childID] = proj
}
Expand Down

0 comments on commit 9d2a178

Please sign in to comment.