()
| 27 | } |
| 28 | |
| 29 | func (c *CachedSubquery) exec() super.Value { |
| 30 | var batches []sbuf.Batch |
| 31 | for { |
| 32 | batch, err := c.body.Pull(false) |
| 33 | if err != nil { |
| 34 | return c.rctx.Sctx.NewError(err) |
| 35 | } |
| 36 | if batch == nil { |
| 37 | return combine(c.rctx.Sctx, batches) |
| 38 | } |
| 39 | batches = append(batches, batch) |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | // Subquery is a simple subquery mechanism where it has both an Eval |
| 44 | // method to implement expressions and a Pull method to act as the parent |