func (p *PercentRank) Type() sql.Type {
	return sql.Float64
}
Type implements sql.Expression
package window
import (
	"sort"
	"strings"
	"github.com/dolthub/go-mysql-server/sql/expression"
	"github.com/dolthub/go-mysql-server/sql"
)
type PercentRank struct {
	window *sql.Window
	pos    int
}
var _ sql.FunctionExpression = (*PercentRank)(nil)
var _ sql.WindowAggregation = (*PercentRank)(nil)
func NewPercentRank() sql.Expression {
	return &PercentRank{}
}
func (p *PercentRank) Window() *sql.Window {
	return p.window
}
func (p *PercentRank) Resolved() bool {
	return windowResolved(p.window)
}
func (p *PercentRank) NewBuffer() sql.Row {
	return sql.NewRow(make([]sql.Row, 0))
}
func (p *PercentRank) String() string {
	sb := strings.Builder{}
	sb.WriteString("percent_rank()")
	if p.window != nil {
		sb.WriteString(" ")
		sb.WriteString(p.window.String())
	}
	return sb.String()
}
func (p *PercentRank) DebugString() string {
	sb := strings.Builder{}
	sb.WriteString("percent_rank()")
	if p.window != nil {
		sb.WriteString(" ")
		sb.WriteString(sql.DebugString(p.window))
	}
	return sb.String()
}
func (p *PercentRank) FunctionName() string {
	return "PERCENT_RANK"
}