MCPcopy Create free account
hub / github.com/brimdata/super / star

Method star

compiler/semantic/schema.go:384–407  ·  view source on GitHub ↗
(n ast.Node, table string, path field.Path)

Source from the content-addressed store, hash-verified

382}
383
384func (j *joinUsingScope) star(n ast.Node, table string, path field.Path) ([]*sem.ThisExpr, error) {
385 if table != "" {
386 // If this is a table.* match, then we don't need to worry about putting
387 // the USING columns on the left. Just let the underlying join do the work.
388 return j.joinScope.star(n, table, path)
389 }
390 // ANSI SQL says the USING columns are leftmost in the table, then the remaining.
391 var out []*sem.ThisExpr
392 for _, col := range j.columns {
393 left, _, err := j.left.resolveUnqualified(col)
394 if err != nil {
395 return nil, err
396 }
397 p := append(append(path, "left"), left...)
398 this := sem.NewThis(n, p)
399 out = append(out, this)
400 }
401 var err error
402 out, err = j.filterAppend(out, j.left, n, append(path, "left"))
403 if err != nil {
404 return nil, err
405 }
406 return j.filterAppend(out, j.right, n, append(path, "right"))
407}
408
409func (j *joinUsingScope) filterAppend(out []*sem.ThisExpr, rs relScope, n ast.Node, path []string) ([]*sem.ThisExpr, error) {
410 exprs, err := rs.star(n, "", path)

Callers

nothing calls this directly

Calls 4

filterAppendMethod · 0.95
NewThisFunction · 0.92
starMethod · 0.65
resolveUnqualifiedMethod · 0.65

Tested by

no test coverage detected