MCPcopy Create free account
hub / github.com/datasweet/datatable / checkInput

Method checkInput

join.go:214–234  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

212}
213
214func (j *joinImpl) checkInput() error {
215 if len(j.tables) < 2 {
216 return ErrNotEnoughDatatables
217 }
218 for i, t := range j.tables {
219 if t == nil || len(t.Name()) == 0 || t.NumCols() == 0 {
220 err := errors.Errorf("table #%d is nil", i)
221 return errors.Wrap(err, ErrNilTable.Error())
222 }
223 }
224 if len(j.on) == 0 {
225 return ErrNoOnClauses
226 }
227 for i, o := range j.on {
228 if len(o.Field) == 0 {
229 err := errors.Errorf("on #%d is nil", i)
230 return errors.Wrap(err, ErrOnClauseIsNil.Error())
231 }
232 }
233 return nil
234}
235
236func (j *joinImpl) initColMapper() {
237 mcols := make(map[string][]string)

Callers 1

ComputeMethod · 0.95

Calls 2

NumColsMethod · 0.80
NameMethod · 0.65

Tested by

no test coverage detected