func (j *JSONArrayAgg) NewBuffer() (sql.AggregationBuffer, error) {
	var row []interface{}
	return &jsonArrayBuffer{row, j}, nil
}
NewBuffer creates a new buffer for the aggregation.
package aggregation
import (
	"fmt"
	"gopkg.in/src-d/go-errors.v1"
	"github.com/dolthub/go-mysql-server/sql"
	"github.com/dolthub/go-mysql-server/sql/expression"
)
var ErrUnsupportedJSONFunction = errors.NewKind("unsupported JSON function: %s")
type JSONArrayAgg struct {
	expression.UnaryExpression
}
var _ sql.FunctionExpression = &JSONArrayAgg{}
var _ sql.Aggregation = &JSONArrayAgg{}
func NewJSONArrayAgg(arg sql.Expression) *JSONArrayAgg {
	return &JSONArrayAgg{expression.UnaryExpression{Child: arg}}
}
func (j *JSONArrayAgg) FunctionName() string {
	return "json_arrayagg"
}