Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bring up JOIN USING and make README query work #5477

Merged
merged 3 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions compiler/ast/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,7 @@ type (
Kind string `json:"kind" unpack:""`
Style string `json:"style"`
RightInput Seq `json:"right_input"`
LeftKey Expr `json:"left_key"`
RightKey Expr `json:"right_key"`
Cond JoinExpr `json:"cond"`
Args Assignments `json:"args"`
Loc `json:"loc"`
}
Expand Down
10 changes: 5 additions & 5 deletions compiler/ast/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,24 @@ type (

type JoinExpr interface {
Node
joinOp()
joinExpr()
}

type JoinOn struct {
type JoinOnExpr struct {
Kind string `json:"kind" unpack:""`
Expr Expr `json:"expr"`
Loc `json:"loc"`
}

func (*JoinOn) joinOp() {}
func (*JoinOnExpr) joinExpr() {}

type JoinUsing struct {
type JoinUsingExpr struct {
Kind string `json:"kind" unpack:""`
Fields []Expr `json:"fields"`
Loc `json:"loc"`
}

func (*JoinUsing) joinOp() {}
func (*JoinUsingExpr) joinExpr() {}

func (*SQLPipe) OpAST() {}
func (*Select) OpAST() {}
Expand Down
4 changes: 2 additions & 2 deletions compiler/ast/unpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ var unpacker = unpack.New(
OrderBy{},
Limit{},
With{},
JoinOn{},
JoinUsing{},
JoinOnExpr{},
JoinUsingExpr{},
)

// UnmarshalOp transforms a JSON representation of an operator into an Op.
Expand Down
Loading