func (c *Count) NewBuffer() (sql.AggregationBuffer, error) {
	bufferChild, err := expression.Clone(c.UnaryExpression.Child)
	if err != nil {
		return nil, err
	}
	return &countBuffer{0, bufferChild}, nil
}
NewBuffer creates a new buffer for the aggregation.
package aggregation
import (
	"fmt"
	"github.com/mitchellh/hashstructure"
	"github.com/dolthub/go-mysql-server/sql"
	"github.com/dolthub/go-mysql-server/sql/expression"
)
type Count struct {
	expression.UnaryExpression
}
var _ sql.FunctionExpression = (*Count)(nil)
var _ sql.Aggregation = (*Count)(nil)
var _ sql.FunctionExpression = (*CountDistinct)(nil)
var _ sql.Aggregation = (*CountDistinct)(nil)
func NewCount(e sql.Expression) *Count {
	return &Count{expression.UnaryExpression{Child: e}}
}
func (c *Count) FunctionName() string {
	return "count"
}