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

Method sqlAppendCrossJoin

compiler/semantic/sql.go:561–572  ·  view source on GitHub ↗
(node ast.Node, leftSeq sem.Seq, leftScope relScope, rhs ast.SQLTableExpr)

Source from the content-addressed store, hash-verified

559}
560
561func (t *translator) sqlAppendCrossJoin(node ast.Node, leftSeq sem.Seq, leftScope relScope, rhs ast.SQLTableExpr) (sem.Seq, relScope) {
562 rightSeq, rightScope := t.sqlTableExpr(rhs, nil)
563 sch := &joinScope{left: leftScope, right: rightScope}
564 par := &sem.ForkOp{Paths: []sem.Seq{leftSeq, rightSeq}}
565 dagJoin := &sem.JoinOp{
566 Node: node,
567 Style: "cross",
568 LeftAlias: "left",
569 RightAlias: "right",
570 }
571 return sem.Seq{par, dagJoin}, sch
572}
573
574// For now, each joining table is on the right...
575// We don't have logic to not care about the side of the JOIN ON keys...

Callers 1

sqlCrossJoinMethod · 0.95

Calls 1

sqlTableExprMethod · 0.95

Tested by

no test coverage detected