mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 04:12:09 +08:00
SQL Expressions: Add STDDEV(), VARIANCE() and aliases (#103851)
* SQL Expressions: Bump GMS for STDDEV(), VARIANCE() Bump Go MySQL Server to the latest version, to get support for STDDEV() and VARIANCE() functions, and their aliases. See https://github.com/dolthub/go-mysql-server/pull/2928 * Update app-code to comply with latest GMS version * Run `go mod tidy` * Update test which had depended on STDDEV being missing * Run `make update-workspace`
This commit is contained in:
@ -72,7 +72,7 @@ type rowIter struct {
|
||||
row int
|
||||
}
|
||||
|
||||
func (ri *rowIter) Next(_ *mysql.Context) (mysql.Row, error) {
|
||||
func (ri *rowIter) Next(ctx *mysql.Context) (mysql.Row, error) {
|
||||
// We assume each field in the Frame has the same number of rows.
|
||||
numRows := 0
|
||||
if len(ri.ft.Frame.Fields) > 0 {
|
||||
@ -95,7 +95,7 @@ func (ri *rowIter) Next(_ *mysql.Context) (mysql.Row, error) {
|
||||
|
||||
// If the field is JSON, convert json.RawMessage to types.JSONDocument
|
||||
if raw, ok := val.(json.RawMessage); ok {
|
||||
doc, inRange, err := types.JSON.Convert(raw)
|
||||
doc, inRange, err := types.JSON.Convert(ctx, raw)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to convert json.RawMessage to JSONDocument: %w", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user