示例#1
0
文件: builder.go 项目: anywhy/tidb
func (b *executorBuilder) buildUnion(v *plan.Union) Executor {
	e := &UnionExec{
		schema: v.GetSchema(),
		fields: v.Fields(),
		Sels:   make([]Executor, len(v.Selects)),
	}
	for i, sel := range v.Selects {
		selExec := b.build(sel)
		e.Sels[i] = selExec
	}
	return e
}
示例#2
0
文件: builder.go 项目: pingcap/tidb
func (b *executorBuilder) buildUnion(v *plan.Union) Executor {
	e := &UnionExec{
		schema: v.GetSchema(),
		Srcs:   make([]Executor, len(v.GetChildren())),
		ctx:    b.ctx,
	}
	for i, sel := range v.GetChildren() {
		selExec := b.build(sel)
		e.Srcs[i] = selExec
	}
	return e
}