Exemplo n.º 1
0
func (b *executorBuilder) buildApply(v *plan.Apply) Executor {
	src := b.build(v.GetChildByIndex(0))
	return &ApplyExec{
		schema:      v.GetSchema(),
		innerExec:   b.build(v.InnerPlan).(NewExecutor),
		outerSchema: v.OuterSchema,
		Src:         src.(NewExecutor),
	}
}
Exemplo n.º 2
0
func (b *executorBuilder) buildApply(v *plan.Apply) Executor {
	src := b.build(v.GetChildByIndex(0))
	apply := &ApplyExec{
		schema:      v.GetSchema(),
		innerExec:   b.build(v.InnerPlan),
		outerSchema: v.OuterSchema,
		Src:         src,
	}
	if v.Checker != nil {
		apply.checker = &conditionChecker{
			all:     v.Checker.All,
			cond:    v.Checker.Condition,
			trimLen: len(src.Schema()),
			ctx:     b.ctx,
		}
	}
	return apply
}