MCPcopy Create free account
hub / github.com/araddon/qlbridge / WalkSourceExec

Method WalkSourceExec

exec/executor.go:200–220  ·  view source on GitHub ↗
(p *plan.Source)

Source from the content-addressed store, hash-verified

198 return NewSource(m.Ctx, p)
199}
200func (m *JobExecutor) WalkSourceExec(p *plan.Source) (Task, error) {
201
202 if p.Conn == nil {
203 if p.DataSource == nil {
204 u.Warnf("no datasource")
205 return nil, fmt.Errorf("missing data source")
206 }
207 source, err := p.DataSource.Open(p.Stmt.SourceName())
208 if err != nil {
209 return nil, err
210 }
211 p.Conn = source
212 }
213
214 e, hasSourceExec := p.Conn.(ExecutorSource)
215 if hasSourceExec {
216 return e.WalkExecSource(p)
217 }
218 u.Warnf("source %T does not implement datasource.Scanner", p.Conn)
219 return nil, fmt.Errorf("%T Must Implement Scanner for %q", p.Conn, p.Stmt.String())
220}
221func (m *JobExecutor) WalkWhere(p *plan.Where) (Task, error) {
222 return NewWhere(m.Ctx, p), nil
223}

Callers

nothing calls this directly

Calls 5

ErrorfMethod · 0.80
OpenMethod · 0.65
WalkExecSourceMethod · 0.65
StringMethod · 0.65
SourceNameMethod · 0.45

Tested by

no test coverage detected