Skip to content

Commit

Permalink
[parser] *: support new aggregation function var_pop and var_samp (pi…
Browse files Browse the repository at this point in the history
  • Loading branch information
mccxj authored and zz-jason committed Dec 4, 2018
1 parent b43dd72 commit 89fc7e8
Show file tree
Hide file tree
Showing 5 changed files with 5,487 additions and 5,420 deletions.
4 changes: 4 additions & 0 deletions parser/ast/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,10 @@ const (
AggFuncBitXor = "bit_xor"
// AggFuncBitAnd is the name of bit_and function.
AggFuncBitAnd = "bit_and"
// AggFuncVarPop is the name of var_pop function
AggFuncVarPop = "var_pop"
// AggFuncVarSamp is the name of var_samp function
AggFuncVarSamp = "var_samp"
// AggFuncStddevPop is the name of stddev_pop function
AggFuncStddevPop = "stddev_pop"
// AggFuncStddevSamp is the name of stddev_samp function
Expand Down
3 changes: 3 additions & 0 deletions parser/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,9 @@ var tokenMap = map[string]int{
"VARBINARY": varbinaryType,
"VARCHAR": varcharType,
"VARIABLES": variables,
"VARIANCE": varPop,
"VAR_POP": varPop,
"VAR_SAMP": varSamp,
"VIEW": view,
"VIRTUAL": virtual,
"WARNINGS": warnings,
Expand Down
Loading

0 comments on commit 89fc7e8

Please sign in to comment.