(p *plan.Source)
| 169 | return root, root.Add(NewDelete(m.Ctx, p)) |
| 170 | } |
| 171 | func (m *JobExecutor) WalkSource(p *plan.Source) (Task, error) { |
| 172 | if len(p.Static) > 0 { |
| 173 | static := membtree.NewStaticData("static") |
| 174 | static.SetColumns(p.Cols) |
| 175 | _, err := static.Put(nil, nil, p.Static) |
| 176 | if err != nil { |
| 177 | u.Errorf("Could not put %v", err) |
| 178 | } |
| 179 | return NewSourceScanner(m.Ctx, p, static), nil |
| 180 | } else if p.Conn == nil { |
| 181 | u.Warnf("no conn? %T", p.DataSource) |
| 182 | if p.DataSource == nil { |
| 183 | u.Warnf("no datasource") |
| 184 | return nil, fmt.Errorf("missing data source") |
| 185 | } |
| 186 | source, err := p.DataSource.Open(p.Stmt.SourceName()) |
| 187 | if err != nil { |
| 188 | return nil, err |
| 189 | } |
| 190 | p.Conn = source |
| 191 | //u.Debugf("setting p.Conn %p %T", p.Conn, p.Conn) |
| 192 | } |
| 193 | |
| 194 | e, hasSourceExec := p.Conn.(ExecutorSource) |
| 195 | if hasSourceExec { |
| 196 | return e.WalkExecSource(p) |
| 197 | } |
| 198 | return NewSource(m.Ctx, p) |
| 199 | } |
| 200 | func (m *JobExecutor) WalkSourceExec(p *plan.Source) (Task, error) { |
| 201 | |
| 202 | if p.Conn == nil { |
nothing calls this directly
no test coverage detected