Skip to content

Commit

Permalink
adds optional window function to aggregate functions in sqlparser
Browse files Browse the repository at this point in the history
(#5852)

Signed-off-by: Corey Winkelmann <[email protected]>
  • Loading branch information
CoreyWinkelmann committed Feb 29, 2024
1 parent 15f5886 commit d5345e0
Show file tree
Hide file tree
Showing 12 changed files with 8,615 additions and 8,151 deletions.
58 changes: 37 additions & 21 deletions go/vt/sqlparser/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -2882,12 +2882,14 @@ type (
}

Count struct {
Args Exprs
Distinct bool
Args Exprs
Distinct bool
OverClause *OverClause
}

CountStar struct {
_ bool
_ bool
OverClause *OverClause
// TL;DR; This makes sure that reference equality checks works as expected
//
// You're correct that this might seem a bit strange at first glance.
Expand Down Expand Up @@ -2917,63 +2919,77 @@ type (
}

Avg struct {
Arg Expr
Distinct bool
Arg Expr
Distinct bool
OverClause *OverClause
}

Max struct {
Arg Expr
Distinct bool
Arg Expr
Distinct bool
OverClause *OverClause
}

Min struct {
Arg Expr
Distinct bool
Arg Expr
Distinct bool
OverClause *OverClause
}

Sum struct {
Arg Expr
Distinct bool
Arg Expr
Distinct bool
OverClause *OverClause
}

BitAnd struct {
Arg Expr
Arg Expr
OverClause *OverClause
}

BitOr struct {
Arg Expr
Arg Expr
OverClause *OverClause
}

BitXor struct {
Arg Expr
Arg Expr
OverClause *OverClause
}

Std struct {
Arg Expr
Arg Expr
OverClause *OverClause
}

StdDev struct {
Arg Expr
Arg Expr
OverClause *OverClause
}

StdPop struct {
Arg Expr
Arg Expr
OverClause *OverClause
}

StdSamp struct {
Arg Expr
Arg Expr
OverClause *OverClause
}

VarPop struct {
Arg Expr
Arg Expr
OverClause *OverClause
}

VarSamp struct {
Arg Expr
Arg Expr
OverClause *OverClause
}

Variance struct {
Arg Expr
Arg Expr
OverClause *OverClause
}

// GroupConcatExpr represents a call to GROUP_CONCAT
Expand Down
16 changes: 16 additions & 0 deletions go/vt/sqlparser/ast_clone.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d5345e0

Please sign in to comment.