aggregation

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEvalUnsupportedOnAggregation = errors.NewKind("Unimplemented %s.Eval(). The code should have used AggregationBuffer.Eval(ctx).")
View Source
var ErrNoPartitions = errors.New("no partitions")
View Source
var ErrPartitionNotSet = errors.New("attempted to general a window frame interval before framer partition was set")
View Source
var ErrRangeIntervalTypeMismatch = errors.New("range bound type must match the order by expression type")
View Source
var ErrRangeInvalidOrderBy = sqlerr.NewKind("a range's order by must be one expression; found: %d")
View Source
var ErrUnsupportedJSONFunction = errors.NewKind("unsupported JSON function: %s")

ErrUnsupportedJSONFunction is returned when a unsupported JSON function is called.

View Source
var UnaryAggDefs support.GenDefs = []support.AggDef{
	{
		Name:     "Avg",
		Desc:     "returns the average value of expr in all rows.",
		Nullable: true,
	},
	{
		Name:    "BitAnd",
		Desc:    "returns the bitwise AND of all bits in expr.",
		RetType: "sql.Uint64",
	},
	{
		Name:    "BitOr",
		Desc:    "returns the bitwise OR of all bits in expr.",
		RetType: "sql.Uint64",
	},
	{
		Name:    "BitXor",
		Desc:    "returns the bitwise XOR of all bits in expr.",
		RetType: "sql.Uint64",
	},
	{
		Name:    "Count",
		Desc:    "returns a count of the number of non-NULL values of expr in the rows retrieved by a SELECT statement.",
		RetType: "sql.Int64",
	},
	{
		Name: "First",
		Desc: "returns the first value in a sequence of elements of an aggregation.",
	},
	{
		Name:    "JsonArray",
		SqlName: "json_arrayagg",
		Desc:    "returns result set as a single JSON array.",
		RetType: "sql.JSON",
	},
	{
		Name: "Last",
		Desc: "returns the last value in a sequence of elements of an aggregation.",
	},
	{
		Name: "Max",
		Desc: "returns the maximum value of expr in all rows.",
	},
	{
		Name: "Min",
		Desc: "returns the minimum value of expr in all rows.",
	},
	{
		Name:     "Sum",
		Desc:     "returns the sum of expr in all rows",
		Nullable: false,
	},
}

Functions

func NewAvgBuffer added in v0.12.0

func NewAvgBuffer(child sql.Expression) *avgBuffer

func NewBitAndBuffer added in v0.14.0

func NewBitAndBuffer(child sql.Expression) *bitAndBuffer

func NewBitOrBuffer added in v0.14.0

func NewBitOrBuffer(child sql.Expression) *bitOrBuffer

func NewBitXorBuffer added in v0.14.0

func NewBitXorBuffer(child sql.Expression) *bitXorBuffer

func NewCountBuffer added in v0.12.0

func NewCountBuffer(child sql.Expression) *countBuffer

func NewCountDistinctBuffer added in v0.12.0

func NewCountDistinctBuffer(children []sql.Expression) *countDistinctBuffer

func NewEmptyGroupConcat added in v0.10.0

func NewEmptyGroupConcat() sql.Expression

func NewFirstBuffer added in v0.12.0

func NewFirstBuffer(child sql.Expression) *firstBuffer

func NewJSONObjectAgg added in v0.9.0

func NewJSONObjectAgg(key, value sql.Expression) sql.Expression

NewJSONObjectAgg creates a new JSONObjectAgg function.

func NewJsonArrayBuffer added in v0.12.0

func NewJsonArrayBuffer(child sql.Expression) *jsonArrayBuffer

func NewLastBuffer added in v0.12.0

func NewLastBuffer(child sql.Expression) *lastBuffer

func NewMaxBuffer added in v0.12.0

func NewMaxBuffer(child sql.Expression) *maxBuffer

func NewMinBuffer added in v0.12.0

func NewMinBuffer(child sql.Expression) *minBuffer

func NewRangeCurrentRowToCurrentRowFramer added in v0.12.0

func NewRangeCurrentRowToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRangeCurrentRowToNFollowingFramer added in v0.12.0

func NewRangeCurrentRowToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRangeCurrentRowToNPrecedingFramer added in v0.12.0

func NewRangeCurrentRowToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRangeCurrentRowToUnboundedFollowingFramer added in v0.12.0

func NewRangeCurrentRowToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRangeNFollowingToCurrentRowFramer added in v0.12.0

func NewRangeNFollowingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRangeNFollowingToNFollowingFramer added in v0.12.0

func NewRangeNFollowingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRangeNFollowingToNPrecedingFramer added in v0.12.0

func NewRangeNFollowingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRangeNFollowingToUnboundedFollowingFramer added in v0.12.0

func NewRangeNFollowingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRangeNPrecedingToCurrentRowFramer added in v0.12.0

func NewRangeNPrecedingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRangeNPrecedingToNFollowingFramer added in v0.12.0

func NewRangeNPrecedingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRangeNPrecedingToNPrecedingFramer added in v0.12.0

func NewRangeNPrecedingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRangeNPrecedingToUnboundedFollowingFramer added in v0.12.0

func NewRangeNPrecedingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRangeUnboundedPrecedingToCurrentRowFramer added in v0.12.0

func NewRangeUnboundedPrecedingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRangeUnboundedPrecedingToNFollowingFramer added in v0.12.0

func NewRangeUnboundedPrecedingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRangeUnboundedPrecedingToNPrecedingFramer added in v0.12.0

func NewRangeUnboundedPrecedingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRangeUnboundedPrecedingToUnboundedFollowingFramer added in v0.12.0

func NewRangeUnboundedPrecedingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRowsCurrentRowToCurrentRowFramer added in v0.12.0

func NewRowsCurrentRowToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRowsCurrentRowToNFollowingFramer added in v0.12.0

func NewRowsCurrentRowToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRowsCurrentRowToNPrecedingFramer added in v0.12.0

func NewRowsCurrentRowToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRowsCurrentRowToUnboundedFollowingFramer added in v0.12.0

func NewRowsCurrentRowToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRowsNFollowingToCurrentRowFramer added in v0.12.0

func NewRowsNFollowingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRowsNFollowingToNFollowingFramer added in v0.12.0

func NewRowsNFollowingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRowsNFollowingToNPrecedingFramer added in v0.12.0

func NewRowsNFollowingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRowsNFollowingToUnboundedFollowingFramer added in v0.12.0

func NewRowsNFollowingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRowsNPrecedingToCurrentRowFramer added in v0.12.0

func NewRowsNPrecedingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRowsNPrecedingToNFollowingFramer added in v0.12.0

func NewRowsNPrecedingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRowsNPrecedingToNPrecedingFramer added in v0.12.0

func NewRowsNPrecedingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRowsNPrecedingToUnboundedFollowingFramer added in v0.12.0

func NewRowsNPrecedingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRowsUnboundedPrecedingToCurrentRowFramer added in v0.12.0

func NewRowsUnboundedPrecedingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRowsUnboundedPrecedingToNFollowingFramer added in v0.12.0

func NewRowsUnboundedPrecedingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRowsUnboundedPrecedingToNPrecedingFramer added in v0.12.0

func NewRowsUnboundedPrecedingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewRowsUnboundedPrecedingToUnboundedFollowingFramer added in v0.12.0

func NewRowsUnboundedPrecedingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)

func NewSumBuffer added in v0.12.0

func NewSumBuffer(child sql.Expression) *sumBuffer

Types

type Aggregation added in v0.12.0

type Aggregation struct {
	// contains filtered or unexported fields
}

Aggregation comprises a sql.WindowFunction and a companion sql.WindowFramer. A parent WindowPartitionIter feeds [fn] with intervals from the [framer]. Iteration logic is divided between [fn] and [framer] depending on context. For example, some aggregation functions like PercentRank and CountAgg track peer groups within a partition, more state than the framer provides.

func NewAggregation added in v0.12.0

func NewAggregation(a sql.WindowFunction, f sql.WindowFramer) *Aggregation

type Avg

type Avg struct {
	// contains filtered or unexported fields
}

func NewAvg

func NewAvg(e sql.Expression) *Avg

func (*Avg) Children added in v0.12.0

func (a *Avg) Children() []sql.Expression

func (Avg) Description added in v0.12.0

func (a Avg) Description() string

func (*Avg) Eval

func (a *Avg) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (Avg) FunctionName

func (a Avg) FunctionName() string

func (*Avg) IsNullable

func (a *Avg) IsNullable() bool

func (*Avg) NewBuffer

func (a *Avg) NewBuffer() (sql.AggregationBuffer, error)

func (*Avg) NewWindowFunction added in v0.12.0

func (a *Avg) NewWindowFunction() (sql.WindowFunction, error)

func (*Avg) Resolved added in v0.12.0

func (a *Avg) Resolved() bool

func (*Avg) String

func (a *Avg) String() string

func (*Avg) Type

func (a *Avg) Type() sql.Type

func (*Avg) Window added in v0.12.0

func (a *Avg) Window() *sql.WindowDefinition

func (*Avg) WithChildren

func (a *Avg) WithChildren(children ...sql.Expression) (sql.Expression, error)

func (*Avg) WithWindow added in v0.12.0

func (a *Avg) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)

type AvgAgg added in v0.12.0

type AvgAgg struct {
	// contains filtered or unexported fields
}

func NewAvgAgg added in v0.12.0

func NewAvgAgg(e sql.Expression) *AvgAgg

func (*AvgAgg) Compute added in v0.12.0

func (a *AvgAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}

func (*AvgAgg) DefaultFramer added in v0.12.0

func (a *AvgAgg) DefaultFramer() sql.WindowFramer

DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer

func (*AvgAgg) Dispose added in v0.12.0

func (a *AvgAgg) Dispose()

func (*AvgAgg) NewSlidingFrameInterval added in v0.12.0

func (a *AvgAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (*AvgAgg) StartPartition added in v0.12.0

func (a *AvgAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error

func (*AvgAgg) WithWindow added in v0.12.0

func (a *AvgAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)

type BitAnd added in v0.14.0

type BitAnd struct {
	// contains filtered or unexported fields
}

func NewBitAnd added in v0.14.0

func NewBitAnd(e sql.Expression) *BitAnd

func (*BitAnd) Children added in v0.14.0

func (a *BitAnd) Children() []sql.Expression

func (BitAnd) Description added in v0.14.0

func (a BitAnd) Description() string

func (*BitAnd) Eval added in v0.14.0

func (a *BitAnd) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (BitAnd) FunctionName added in v0.14.0

func (a BitAnd) FunctionName() string

func (*BitAnd) IsNullable added in v0.14.0

func (a *BitAnd) IsNullable() bool

func (*BitAnd) NewBuffer added in v0.14.0

func (a *BitAnd) NewBuffer() (sql.AggregationBuffer, error)

func (*BitAnd) NewWindowFunction added in v0.14.0

func (a *BitAnd) NewWindowFunction() (sql.WindowFunction, error)

func (*BitAnd) Resolved added in v0.14.0

func (a *BitAnd) Resolved() bool

func (*BitAnd) String added in v0.14.0

func (a *BitAnd) String() string

func (*BitAnd) Type added in v0.14.0

func (a *BitAnd) Type() sql.Type

func (*BitAnd) Window added in v0.14.0

func (a *BitAnd) Window() *sql.WindowDefinition

func (*BitAnd) WithChildren added in v0.14.0

func (a *BitAnd) WithChildren(children ...sql.Expression) (sql.Expression, error)

func (*BitAnd) WithWindow added in v0.14.0

func (a *BitAnd) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)

type BitAndAgg added in v0.14.0

type BitAndAgg struct {
	// contains filtered or unexported fields
}

func NewBitAndAgg added in v0.14.0

func NewBitAndAgg(e sql.Expression) *BitAndAgg

func (*BitAndAgg) Compute added in v0.14.0

func (b *BitAndAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}

func (*BitAndAgg) DefaultFramer added in v0.14.0

func (b *BitAndAgg) DefaultFramer() sql.WindowFramer

DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer

func (*BitAndAgg) Dispose added in v0.14.0

func (b *BitAndAgg) Dispose()

func (*BitAndAgg) NewSlidingFrameInterval added in v0.14.0

func (b *BitAndAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (*BitAndAgg) StartPartition added in v0.14.0

func (b *BitAndAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error

func (*BitAndAgg) WithWindow added in v0.14.0

func (b *BitAndAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)

type BitOr added in v0.14.0

type BitOr struct {
	// contains filtered or unexported fields
}

func NewBitOr added in v0.14.0

func NewBitOr(e sql.Expression) *BitOr

func (*BitOr) Children added in v0.14.0

func (a *BitOr) Children() []sql.Expression

func (BitOr) Description added in v0.14.0

func (a BitOr) Description() string

func (*BitOr) Eval added in v0.14.0

func (a *BitOr) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (BitOr) FunctionName added in v0.14.0

func (a BitOr) FunctionName() string

func (*BitOr) IsNullable added in v0.14.0

func (a *BitOr) IsNullable() bool

func (*BitOr) NewBuffer added in v0.14.0

func (a *BitOr) NewBuffer() (sql.AggregationBuffer, error)

func (*BitOr) NewWindowFunction added in v0.14.0

func (a *BitOr) NewWindowFunction() (sql.WindowFunction, error)

func (*BitOr) Resolved added in v0.14.0

func (a *BitOr) Resolved() bool

func (*BitOr) String added in v0.14.0

func (a *BitOr) String() string

func (*BitOr) Type added in v0.14.0

func (a *BitOr) Type() sql.Type

func (*BitOr) Window added in v0.14.0

func (a *BitOr) Window() *sql.WindowDefinition

func (*BitOr) WithChildren added in v0.14.0

func (a *BitOr) WithChildren(children ...sql.Expression) (sql.Expression, error)

func (*BitOr) WithWindow added in v0.14.0

func (a *BitOr) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)

type BitOrAgg added in v0.14.0

type BitOrAgg struct {
	// contains filtered or unexported fields
}

func NewBitOrAgg added in v0.14.0

func NewBitOrAgg(e sql.Expression) *BitOrAgg

func (*BitOrAgg) Compute added in v0.14.0

func (b *BitOrAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}

func (*BitOrAgg) DefaultFramer added in v0.14.0

func (b *BitOrAgg) DefaultFramer() sql.WindowFramer

DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer

func (*BitOrAgg) Dispose added in v0.14.0

func (b *BitOrAgg) Dispose()

func (*BitOrAgg) NewSlidingFrameInterval added in v0.14.0

func (b *BitOrAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (*BitOrAgg) StartPartition added in v0.14.0

func (b *BitOrAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error

func (*BitOrAgg) WithWindow added in v0.14.0

func (b *BitOrAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)

type BitXor added in v0.14.0

type BitXor struct {
	// contains filtered or unexported fields
}

func NewBitXor added in v0.14.0

func NewBitXor(e sql.Expression) *BitXor

func (*BitXor) Children added in v0.14.0

func (a *BitXor) Children() []sql.Expression

func (BitXor) Description added in v0.14.0

func (a BitXor) Description() string

func (*BitXor) Eval added in v0.14.0

func (a *BitXor) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (BitXor) FunctionName added in v0.14.0

func (a BitXor) FunctionName() string

func (*BitXor) IsNullable added in v0.14.0

func (a *BitXor) IsNullable() bool

func (*BitXor) NewBuffer added in v0.14.0

func (a *BitXor) NewBuffer() (sql.AggregationBuffer, error)

func (*BitXor) NewWindowFunction added in v0.14.0

func (a *BitXor) NewWindowFunction() (sql.WindowFunction, error)

func (*BitXor) Resolved added in v0.14.0

func (a *BitXor) Resolved() bool

func (*BitXor) String added in v0.14.0

func (a *BitXor) String() string

func (*BitXor) Type added in v0.14.0

func (a *BitXor) Type() sql.Type

func (*BitXor) Window added in v0.14.0

func (a *BitXor) Window() *sql.WindowDefinition

func (*BitXor) WithChildren added in v0.14.0

func (a *BitXor) WithChildren(children ...sql.Expression) (sql.Expression, error)

func (*BitXor) WithWindow added in v0.14.0

func (a *BitXor) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)

type BitXorAgg added in v0.14.0

type BitXorAgg struct {
	// contains filtered or unexported fields
}

func NewBitXorAgg added in v0.14.0

func NewBitXorAgg(e sql.Expression) *BitXorAgg

func (*BitXorAgg) Compute added in v0.14.0

func (b *BitXorAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}

func (*BitXorAgg) DefaultFramer added in v0.14.0

func (b *BitXorAgg) DefaultFramer() sql.WindowFramer

DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer

func (*BitXorAgg) Dispose added in v0.14.0

func (b *BitXorAgg) Dispose()

func (*BitXorAgg) NewSlidingFrameInterval added in v0.14.0

func (b *BitXorAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (*BitXorAgg) StartPartition added in v0.14.0

func (b *BitXorAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error

func (*BitXorAgg) WithWindow added in v0.14.0

func (b *BitXorAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)

type Count

type Count struct {
	// contains filtered or unexported fields
}

func NewCount

func NewCount(e sql.Expression) *Count

func (*Count) Children added in v0.12.0

func (a *Count) Children() []sql.Expression

func (Count) Description added in v0.12.0

func (a Count) Description() string

func (*Count) Eval

func (a *Count) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (Count) FunctionName

func (a Count) FunctionName() string

func (*Count) IsNullable

func (a *Count) IsNullable() bool

func (*Count) NewBuffer

func (a *Count) NewBuffer() (sql.AggregationBuffer, error)

func (*Count) NewWindowFunction added in v0.12.0

func (a *Count) NewWindowFunction() (sql.WindowFunction, error)

func (*Count) Resolved

func (a *Count) Resolved() bool

func (*Count) String

func (a *Count) String() string

func (*Count) Type

func (a *Count) Type() sql.Type

func (*Count) Window added in v0.12.0

func (a *Count) Window() *sql.WindowDefinition

func (*Count) WithChildren

func (a *Count) WithChildren(children ...sql.Expression) (sql.Expression, error)

func (*Count) WithWindow added in v0.12.0

func (a *Count) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)

type CountAgg added in v0.12.0

type CountAgg struct {
	// contains filtered or unexported fields
}

func NewCountAgg added in v0.12.0

func NewCountAgg(e sql.Expression) *CountAgg

func NewCountDistinctAgg added in v0.12.0

func NewCountDistinctAgg(e sql.Expression) *CountAgg

func (*CountAgg) Compute added in v0.12.0

func (a *CountAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}

func (*CountAgg) DefaultFramer added in v0.12.0

func (a *CountAgg) DefaultFramer() sql.WindowFramer

DefaultFramer returns a NewPartitionFramer

func (*CountAgg) Dispose added in v0.12.0

func (a *CountAgg) Dispose()

func (*CountAgg) NewSlidingFrameInterval added in v0.12.0

func (a *CountAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (*CountAgg) StartPartition added in v0.12.0

func (a *CountAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error

func (*CountAgg) WithWindow added in v0.12.0

func (a *CountAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)

type CountDistinct

type CountDistinct struct {
	expression.NaryExpression
	// contains filtered or unexported fields
}

func NewCountDistinct

func NewCountDistinct(exprs ...sql.Expression) *CountDistinct

func (*CountDistinct) Children added in v0.12.0

func (a *CountDistinct) Children() []sql.Expression

Children implements the Expression interface.

func (*CountDistinct) Description added in v0.12.0

func (a *CountDistinct) Description() string

Description implements the FunctionExpression interface.

func (*CountDistinct) Eval

func (a *CountDistinct) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*CountDistinct) FunctionName added in v0.11.0

func (a *CountDistinct) FunctionName() string

FunctionName implements the FunctionExpression interface.

func (*CountDistinct) IsNullable

func (a *CountDistinct) IsNullable() bool

IsNullable implements the Expression interface.

func (*CountDistinct) NewBuffer

func (a *CountDistinct) NewBuffer() (sql.AggregationBuffer, error)

NewBuffer implements the Aggregation interface.

func (*CountDistinct) NewWindowFunction added in v0.12.0

func (a *CountDistinct) NewWindowFunction() (sql.WindowFunction, error)

NewWindowFunction implements the WindowAdaptableExpression interface.

func (*CountDistinct) String

func (a *CountDistinct) String() string

String implements the ValueStats interface.

func (*CountDistinct) Type

func (a *CountDistinct) Type() sql.Type

Type implements the Expression interface.

func (*CountDistinct) Window added in v0.12.0

func (a *CountDistinct) Window() *sql.WindowDefinition

Window implements the Aggregation interface.

func (*CountDistinct) WithChildren

func (a *CountDistinct) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

func (*CountDistinct) WithWindow added in v0.12.0

func (a *CountDistinct) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)

WithWindow implements the Aggregation interface.

type DenseRank added in v0.14.0

type DenseRank struct {
	// contains filtered or unexported fields
}

func NewDenseRank added in v0.14.0

func NewDenseRank(orderBy []sql.Expression) *DenseRank

func (*DenseRank) Compute added in v0.14.0

func (a *DenseRank) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}

Compute returns the number of unique elements before the current peer group (rank) + 1. ex: [1, 2, 2, 2, 3, 3, 3, 4, 5, 5, 6] => every 3 returns uint64(3) because there are 2 unique values less than 3

func (DenseRank) DefaultFramer added in v0.14.0

func (a DenseRank) DefaultFramer() sql.WindowFramer

func (DenseRank) Dispose added in v0.14.0

func (a DenseRank) Dispose()

func (DenseRank) NewSlidingFrameInterval added in v0.14.0

func (a DenseRank) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (DenseRank) StartPartition added in v0.14.0

func (a DenseRank) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error

func (DenseRank) WithWindow added in v0.14.0

func (a DenseRank) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)

type First

type First struct {
	// contains filtered or unexported fields
}

func NewFirst

func NewFirst(e sql.Expression) *First

func (*First) Children added in v0.12.0

func (a *First) Children() []sql.Expression

func (First) Description added in v0.12.0

func (a First) Description() string

func (*First) Eval

func (a *First) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (First) FunctionName

func (a First) FunctionName() string

func (*First) IsNullable added in v0.12.0

func (a *First) IsNullable() bool

func (*First) NewBuffer

func (a *First) NewBuffer() (sql.AggregationBuffer, error)

func (*First) NewWindowFunction added in v0.12.0

func (a *First) NewWindowFunction() (sql.WindowFunction, error)

func (*First) Resolved added in v0.12.0

func (a *First) Resolved() bool

func (*First) String

func (a *First) String() string

func (*First) Type

func (a *First) Type() sql.Type

func (*First) Window added in v0.12.0

func (a *First) Window() *sql.WindowDefinition

func (*First) WithChildren

func (a *First) WithChildren(children ...sql.Expression) (sql.Expression, error)

func (*First) WithWindow added in v0.12.0

func (a *First) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)

type FirstAgg added in v0.12.0

type FirstAgg struct {
	// contains filtered or unexported fields
}

func NewFirstAgg added in v0.12.0

func NewFirstAgg(e sql.Expression) *FirstAgg

func (*FirstAgg) Compute added in v0.12.0

func (a *FirstAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}

func (*FirstAgg) DefaultFramer added in v0.12.0

func (a *FirstAgg) DefaultFramer() sql.WindowFramer

DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer

func (*FirstAgg) Dispose added in v0.12.0

func (a *FirstAgg) Dispose()

func (*FirstAgg) NewSlidingFrameInterval added in v0.12.0

func (a *FirstAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (*FirstAgg) StartPartition added in v0.12.0

func (a *FirstAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error

func (*FirstAgg) WithWindow added in v0.12.0

func (a *FirstAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)

type GroupByFramer added in v0.12.0

type GroupByFramer struct {
	// contains filtered or unexported fields
}

func NewGroupByFramer added in v0.12.0

func NewGroupByFramer() *GroupByFramer

func (*GroupByFramer) FirstIdx added in v0.12.0

func (f *GroupByFramer) FirstIdx() int

func (*GroupByFramer) Interval added in v0.12.0

func (f *GroupByFramer) Interval() (sql.WindowInterval, error)

func (*GroupByFramer) LastIdx added in v0.12.0

func (f *GroupByFramer) LastIdx() int

func (*GroupByFramer) NewFramer added in v0.12.0

func (f *GroupByFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*GroupByFramer) Next added in v0.12.0

func (f *GroupByFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

func (*GroupByFramer) SlidingInterval added in v0.12.0

type GroupConcat added in v0.10.0

type GroupConcat struct {
	// contains filtered or unexported fields
}

func NewGroupConcat added in v0.10.0

func NewGroupConcat(distinct string, orderBy sql.SortFields, separator string, selectExprs []sql.Expression, maxLen int) (*GroupConcat, error)

func (*GroupConcat) Children added in v0.10.0

func (g *GroupConcat) Children() []sql.Expression

Children implements the Expression interface.

func (*GroupConcat) Description added in v0.12.0

func (g *GroupConcat) Description() string

Description implements sql.FunctionExpression

func (*GroupConcat) Eval added in v0.10.0

func (g *GroupConcat) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*GroupConcat) FunctionName added in v0.10.0

func (g *GroupConcat) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*GroupConcat) IsNullable added in v0.10.0

func (g *GroupConcat) IsNullable() bool

IsNullable implements the Expression interface.

func (*GroupConcat) NewBuffer added in v0.10.0

func (g *GroupConcat) NewBuffer() (sql.AggregationBuffer, error)

NewBuffer creates a new buffer for the aggregation.

func (*GroupConcat) NewWindowFunction added in v0.12.0

func (g *GroupConcat) NewWindowFunction() (sql.WindowFunction, error)

NewWindowFunctionAggregation implements sql.WindowAdaptableExpression

func (*GroupConcat) Resolved added in v0.10.0

func (g *GroupConcat) Resolved() bool

Resolved implements the Expression interface.

func (*GroupConcat) String added in v0.10.0

func (g *GroupConcat) String() string

func (*GroupConcat) Type added in v0.10.0

func (g *GroupConcat) Type() sql.Type

Type implements the Expression interface. cc: https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_group-concat for explanations on return type.

func (*GroupConcat) Window added in v0.12.0

func (g *GroupConcat) Window() *sql.WindowDefinition

Window implements sql.Aggregation

func (*GroupConcat) WithChildren added in v0.10.0

func (g *GroupConcat) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

func (*GroupConcat) WithWindow added in v0.12.0

func (g *GroupConcat) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)

WithWindow implements sql.Aggregation

type GroupConcatAgg added in v0.12.0

type GroupConcatAgg struct {
	// contains filtered or unexported fields
}

func NewGroupConcatAgg added in v0.12.0

func NewGroupConcatAgg(gc *GroupConcat) *GroupConcatAgg

func (*GroupConcatAgg) Compute added in v0.12.0

func (a *GroupConcatAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}

func (*GroupConcatAgg) DefaultFramer added in v0.12.0

func (a *GroupConcatAgg) DefaultFramer() sql.WindowFramer

DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer

func (*GroupConcatAgg) Dispose added in v0.12.0

func (a *GroupConcatAgg) Dispose()

func (*GroupConcatAgg) NewSlidingFrameInterval added in v0.12.0

func (a *GroupConcatAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (*GroupConcatAgg) StartPartition added in v0.12.0

func (a *GroupConcatAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error

func (*GroupConcatAgg) WithWindow added in v0.12.0

type JSONObjectAgg added in v0.9.0

type JSONObjectAgg struct {
	// contains filtered or unexported fields
}

JSON_OBJECTAGG(key, value) [over_clause]

JSONObjectAgg Takes two column names or expressions as arguments, the first of these being used as a key and the second as a value, and returns a JSON object containing key-value pairs. Returns NULL if the result contains no rows, or in the event of an error. An error occurs if any key name is NULL or the number of arguments is not equal to 2.

https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_json-objectagg

see also: https://dev.mysql.com/doc/refman/8.0/en/json.html#json-normalization

func (*JSONObjectAgg) Children added in v0.9.0

func (j *JSONObjectAgg) Children() []sql.Expression

Children implements the Expression interface.

func (*JSONObjectAgg) Description added in v0.12.0

func (j *JSONObjectAgg) Description() string

Description implements sql.FunctionExpression

func (*JSONObjectAgg) Eval added in v0.9.0

func (j *JSONObjectAgg) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*JSONObjectAgg) FunctionName added in v0.9.0

func (j *JSONObjectAgg) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*JSONObjectAgg) IsNullable added in v0.9.0

func (j *JSONObjectAgg) IsNullable() bool

IsNullable implements the Expression interface.

func (*JSONObjectAgg) NewBuffer added in v0.9.0

func (j *JSONObjectAgg) NewBuffer() (sql.AggregationBuffer, error)

NewBuffer implements the Aggregation interface.

func (*JSONObjectAgg) NewWindowFunction added in v0.12.0

func (j *JSONObjectAgg) NewWindowFunction() (sql.WindowFunction, error)

NewWindowFunctionAggregation implements sql.WindowAdaptableExpression

func (*JSONObjectAgg) Resolved added in v0.9.0

func (j *JSONObjectAgg) Resolved() bool

Resolved implements the Expression interface.

func (*JSONObjectAgg) String added in v0.9.0

func (j *JSONObjectAgg) String() string

func (*JSONObjectAgg) Type added in v0.9.0

func (j *JSONObjectAgg) Type() sql.Type

Type implements the Expression interface.

func (*JSONObjectAgg) Window added in v0.12.0

func (j *JSONObjectAgg) Window() *sql.WindowDefinition

Window implements sql.Aggregation

func (*JSONObjectAgg) WithChildren added in v0.9.0

func (j *JSONObjectAgg) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

func (*JSONObjectAgg) WithWindow added in v0.12.0

func (j *JSONObjectAgg) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)

WithWindow implements sql.Aggregation

type JsonArray added in v0.12.0

type JsonArray struct {
	// contains filtered or unexported fields
}

func NewJsonArray added in v0.12.0

func NewJsonArray(e sql.Expression) *JsonArray

func (*JsonArray) Children added in v0.12.0

func (a *JsonArray) Children() []sql.Expression

func (JsonArray) Description added in v0.12.0

func (a JsonArray) Description() string

func (*JsonArray) Eval added in v0.12.0

func (a *JsonArray) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (JsonArray) FunctionName added in v0.12.0

func (a JsonArray) FunctionName() string

func (*JsonArray) IsNullable added in v0.12.0

func (a *JsonArray) IsNullable() bool

func (*JsonArray) NewBuffer added in v0.12.0

func (a *JsonArray) NewBuffer() (sql.AggregationBuffer, error)

func (*JsonArray) NewWindowFunction added in v0.12.0

func (a *JsonArray) NewWindowFunction() (sql.WindowFunction, error)

func (*JsonArray) Resolved added in v0.12.0

func (a *JsonArray) Resolved() bool

func (*JsonArray) String added in v0.12.0

func (a *JsonArray) String() string

func (*JsonArray) Type added in v0.12.0

func (a *JsonArray) Type() sql.Type

func (*JsonArray) Window added in v0.12.0

func (a *JsonArray) Window() *sql.WindowDefinition

func (*JsonArray) WithChildren added in v0.12.0

func (a *JsonArray) WithChildren(children ...sql.Expression) (sql.Expression, error)

func (*JsonArray) WithWindow added in v0.12.0

func (a *JsonArray) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)

type Lag added in v0.12.0

type Lag struct {
	// contains filtered or unexported fields
}

func NewLag added in v0.12.0

func NewLag(expr, def sql.Expression, offset int) *Lag

func (*Lag) Compute added in v0.12.0

func (a *Lag) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}

func (*Lag) DefaultFramer added in v0.12.0

func (a *Lag) DefaultFramer() sql.WindowFramer

DefaultFramer returns a NewPartitionFramer

func (*Lag) Dispose added in v0.12.0

func (a *Lag) Dispose()

func (*Lag) NewSlidingFrameInterval added in v0.12.0

func (a *Lag) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (*Lag) StartPartition added in v0.12.0

func (a *Lag) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error

func (*Lag) WithWindow added in v0.12.0

func (a *Lag) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)

type Last

type Last struct {
	// contains filtered or unexported fields
}

func NewLast

func NewLast(e sql.Expression) *Last

func (*Last) Children added in v0.12.0

func (a *Last) Children() []sql.Expression

func (Last) Description added in v0.12.0

func (a Last) Description() string

func (*Last) Eval

func (a *Last) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (Last) FunctionName

func (a Last) FunctionName() string

func (*Last) IsNullable added in v0.12.0

func (a *Last) IsNullable() bool

func (*Last) NewBuffer

func (a *Last) NewBuffer() (sql.AggregationBuffer, error)

func (*Last) NewWindowFunction added in v0.12.0

func (a *Last) NewWindowFunction() (sql.WindowFunction, error)

func (*Last) Resolved added in v0.12.0

func (a *Last) Resolved() bool

func (*Last) String

func (a *Last) String() string

func (*Last) Type

func (a *Last) Type() sql.Type

func (*Last) Window added in v0.12.0

func (a *Last) Window() *sql.WindowDefinition

func (*Last) WithChildren

func (a *Last) WithChildren(children ...sql.Expression) (sql.Expression, error)

func (*Last) WithWindow added in v0.12.0

func (a *Last) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)

type LastAgg added in v0.12.0

type LastAgg struct {
	// contains filtered or unexported fields
}

func NewLastAgg added in v0.12.0

func NewLastAgg(e sql.Expression) *LastAgg

func (*LastAgg) Compute added in v0.12.0

func (a *LastAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}

func (*LastAgg) DefaultFramer added in v0.12.0

func (a *LastAgg) DefaultFramer() sql.WindowFramer

DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer

func (*LastAgg) Dispose added in v0.12.0

func (a *LastAgg) Dispose()

func (*LastAgg) NewSlidingFrameInterval added in v0.12.0

func (a *LastAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (*LastAgg) StartPartition added in v0.12.0

func (a *LastAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error

func (*LastAgg) WithWindow added in v0.12.0

func (a *LastAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)

type Lead added in v0.12.0

type Lead struct {
	// contains filtered or unexported fields
}

func NewLead added in v0.12.0

func NewLead(expr, def sql.Expression, offset int) *Lead

func (*Lead) Compute added in v0.12.0

func (a *Lead) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}

func (*Lead) DefaultFramer added in v0.12.0

func (a *Lead) DefaultFramer() sql.WindowFramer

DefaultFramer returns a NewPartitionFramer

func (*Lead) Dispose added in v0.12.0

func (a *Lead) Dispose()

func (*Lead) NewSlidingFrameInterval added in v0.12.0

func (a *Lead) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (*Lead) StartPartition added in v0.12.0

func (a *Lead) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error

func (*Lead) WithWindow added in v0.12.0

func (a *Lead) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)

type Max

type Max struct {
	// contains filtered or unexported fields
}

func NewMax

func NewMax(e sql.Expression) *Max

func (*Max) Children added in v0.12.0

func (a *Max) Children() []sql.Expression

func (Max) Description added in v0.12.0

func (a Max) Description() string

func (*Max) Eval

func (a *Max) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (Max) FunctionName

func (a Max) FunctionName() string

func (*Max) IsNullable

func (a *Max) IsNullable() bool

func (*Max) NewBuffer

func (a *Max) NewBuffer() (sql.AggregationBuffer, error)

func (*Max) NewWindowFunction added in v0.12.0

func (a *Max) NewWindowFunction() (sql.WindowFunction, error)

func (*Max) Resolved added in v0.12.0

func (a *Max) Resolved() bool

func (*Max) String

func (a *Max) String() string

func (*Max) Type

func (a *Max) Type() sql.Type

func (*Max) Window added in v0.12.0

func (a *Max) Window() *sql.WindowDefinition

func (*Max) WithChildren

func (a *Max) WithChildren(children ...sql.Expression) (sql.Expression, error)

func (*Max) WithWindow added in v0.12.0

func (a *Max) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)

type MaxAgg added in v0.12.0

type MaxAgg struct {
	// contains filtered or unexported fields
}

func NewMaxAgg added in v0.12.0

func NewMaxAgg(e sql.Expression) *MaxAgg

func (*MaxAgg) Compute added in v0.12.0

func (a *MaxAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}

func (*MaxAgg) DefaultFramer added in v0.12.0

func (a *MaxAgg) DefaultFramer() sql.WindowFramer

DefaultFramer returns a NewPartitionFramer

func (*MaxAgg) Dispose added in v0.12.0

func (a *MaxAgg) Dispose()

func (*MaxAgg) NewSlidingFrameInterval added in v0.12.0

func (a *MaxAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (*MaxAgg) StartPartition added in v0.12.0

func (a *MaxAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error

func (*MaxAgg) WithWindow added in v0.12.0

func (a *MaxAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)

type Min

type Min struct {
	// contains filtered or unexported fields
}

func NewMin

func NewMin(e sql.Expression) *Min

func (*Min) Children added in v0.12.0

func (a *Min) Children() []sql.Expression

func (Min) Description added in v0.12.0

func (a Min) Description() string

func (*Min) Eval

func (a *Min) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (Min) FunctionName

func (a Min) FunctionName() string

func (*Min) IsNullable

func (a *Min) IsNullable() bool

func (*Min) NewBuffer

func (a *Min) NewBuffer() (sql.AggregationBuffer, error)

func (*Min) NewWindowFunction added in v0.12.0

func (a *Min) NewWindowFunction() (sql.WindowFunction, error)

func (*Min) Resolved added in v0.12.0

func (a *Min) Resolved() bool

func (*Min) String

func (a *Min) String() string

func (*Min) Type

func (a *Min) Type() sql.Type

func (*Min) Window added in v0.12.0

func (a *Min) Window() *sql.WindowDefinition

func (*Min) WithChildren

func (a *Min) WithChildren(children ...sql.Expression) (sql.Expression, error)

func (*Min) WithWindow added in v0.12.0

func (a *Min) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)

type MinAgg added in v0.12.0

type MinAgg struct {
	// contains filtered or unexported fields
}

func NewMinAgg added in v0.12.0

func NewMinAgg(e sql.Expression) *MinAgg

func (*MinAgg) Compute added in v0.12.0

func (a *MinAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}

func (*MinAgg) DefaultFramer added in v0.12.0

func (a *MinAgg) DefaultFramer() sql.WindowFramer

DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer

func (*MinAgg) Dispose added in v0.12.0

func (a *MinAgg) Dispose()

func (*MinAgg) NewSlidingFrameInterval added in v0.12.0

func (a *MinAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (*MinAgg) StartPartition added in v0.12.0

func (a *MinAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error

func (*MinAgg) WithWindow added in v0.12.0

func (a *MinAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)

type PartitionFramer added in v0.12.0

type PartitionFramer struct {
	// contains filtered or unexported fields
}

func NewPartitionFramer added in v0.12.0

func NewPartitionFramer() *PartitionFramer

func (*PartitionFramer) Close added in v0.12.0

func (f *PartitionFramer) Close()

func (*PartitionFramer) FirstIdx added in v0.12.0

func (f *PartitionFramer) FirstIdx() int

func (*PartitionFramer) Interval added in v0.12.0

func (f *PartitionFramer) Interval() (sql.WindowInterval, error)

func (*PartitionFramer) LastIdx added in v0.12.0

func (f *PartitionFramer) LastIdx() int

func (*PartitionFramer) NewFramer added in v0.12.0

func (f *PartitionFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*PartitionFramer) Next added in v0.12.0

func (*PartitionFramer) SlidingInterval added in v0.12.0

type PeerGroupFramer added in v0.12.0

type PeerGroupFramer struct {
	// contains filtered or unexported fields
}

func NewPeerGroupFramer added in v0.12.0

func NewPeerGroupFramer(orderBy []sql.Expression) *PeerGroupFramer

func (*PeerGroupFramer) FirstIdx added in v0.12.0

func (f *PeerGroupFramer) FirstIdx() int

func (*PeerGroupFramer) Interval added in v0.12.0

func (f *PeerGroupFramer) Interval() (sql.WindowInterval, error)

func (*PeerGroupFramer) LastIdx added in v0.12.0

func (f *PeerGroupFramer) LastIdx() int

func (*PeerGroupFramer) NewFramer added in v0.12.0

func (f *PeerGroupFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*PeerGroupFramer) Next added in v0.12.0

type PercentRank added in v0.12.0

type PercentRank struct {
	// contains filtered or unexported fields
}

func NewPercentRank added in v0.12.0

func NewPercentRank(orderBy []sql.Expression) *PercentRank

func (*PercentRank) Compute added in v0.12.0

func (a *PercentRank) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}

Compute returns the number of elements before the current peer group (rank), and returns (rank - 1)/(rows - 1). ex: [1, 2, 2, 2, 3, 3, 3, 4, 5, 5, 6] => every 3 returns float64(4) / float64(9), because there are 4 values less than 3, and there are (10 - 1) total rows in the list.

func (PercentRank) DefaultFramer added in v0.12.0

func (a PercentRank) DefaultFramer() sql.WindowFramer

func (PercentRank) Dispose added in v0.12.0

func (a PercentRank) Dispose()

func (PercentRank) NewSlidingFrameInterval added in v0.12.0

func (a PercentRank) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (PercentRank) StartPartition added in v0.12.0

func (a PercentRank) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error

func (PercentRank) WithWindow added in v0.12.0

func (a PercentRank) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)

type RangeCurrentRowToCurrentRowFramer added in v0.12.0

type RangeCurrentRowToCurrentRowFramer struct {
	// contains filtered or unexported fields
}

func (*RangeCurrentRowToCurrentRowFramer) FirstIdx added in v0.12.0

func (f *RangeCurrentRowToCurrentRowFramer) FirstIdx() int

func (*RangeCurrentRowToCurrentRowFramer) Interval added in v0.12.0

func (f *RangeCurrentRowToCurrentRowFramer) Interval() (sql.WindowInterval, error)

func (*RangeCurrentRowToCurrentRowFramer) LastIdx added in v0.12.0

func (f *RangeCurrentRowToCurrentRowFramer) LastIdx() int

func (*RangeCurrentRowToCurrentRowFramer) NewFramer added in v0.12.0

func (f *RangeCurrentRowToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RangeCurrentRowToCurrentRowFramer) Next added in v0.12.0

func (f *RangeCurrentRowToCurrentRowFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)

type RangeCurrentRowToNFollowingFramer added in v0.12.0

type RangeCurrentRowToNFollowingFramer struct {
	// contains filtered or unexported fields
}

func (*RangeCurrentRowToNFollowingFramer) FirstIdx added in v0.12.0

func (f *RangeCurrentRowToNFollowingFramer) FirstIdx() int

func (*RangeCurrentRowToNFollowingFramer) Interval added in v0.12.0

func (f *RangeCurrentRowToNFollowingFramer) Interval() (sql.WindowInterval, error)

func (*RangeCurrentRowToNFollowingFramer) LastIdx added in v0.12.0

func (f *RangeCurrentRowToNFollowingFramer) LastIdx() int

func (*RangeCurrentRowToNFollowingFramer) NewFramer added in v0.12.0

func (f *RangeCurrentRowToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RangeCurrentRowToNFollowingFramer) Next added in v0.12.0

func (f *RangeCurrentRowToNFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)

type RangeCurrentRowToNPrecedingFramer added in v0.12.0

type RangeCurrentRowToNPrecedingFramer struct {
	// contains filtered or unexported fields
}

func (*RangeCurrentRowToNPrecedingFramer) FirstIdx added in v0.12.0

func (f *RangeCurrentRowToNPrecedingFramer) FirstIdx() int

func (*RangeCurrentRowToNPrecedingFramer) Interval added in v0.12.0

func (f *RangeCurrentRowToNPrecedingFramer) Interval() (sql.WindowInterval, error)

func (*RangeCurrentRowToNPrecedingFramer) LastIdx added in v0.12.0

func (f *RangeCurrentRowToNPrecedingFramer) LastIdx() int

func (*RangeCurrentRowToNPrecedingFramer) NewFramer added in v0.12.0

func (f *RangeCurrentRowToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RangeCurrentRowToNPrecedingFramer) Next added in v0.12.0

func (f *RangeCurrentRowToNPrecedingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)

type RangeCurrentRowToUnboundedFollowingFramer added in v0.12.0

type RangeCurrentRowToUnboundedFollowingFramer struct {
	// contains filtered or unexported fields
}

func (*RangeCurrentRowToUnboundedFollowingFramer) FirstIdx added in v0.12.0

func (f *RangeCurrentRowToUnboundedFollowingFramer) FirstIdx() int

func (*RangeCurrentRowToUnboundedFollowingFramer) Interval added in v0.12.0

func (f *RangeCurrentRowToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)

func (*RangeCurrentRowToUnboundedFollowingFramer) LastIdx added in v0.12.0

func (f *RangeCurrentRowToUnboundedFollowingFramer) LastIdx() int

func (*RangeCurrentRowToUnboundedFollowingFramer) NewFramer added in v0.12.0

func (f *RangeCurrentRowToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RangeCurrentRowToUnboundedFollowingFramer) Next added in v0.12.0

func (f *RangeCurrentRowToUnboundedFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)

type RangeNFollowingToCurrentRowFramer added in v0.12.0

type RangeNFollowingToCurrentRowFramer struct {
	// contains filtered or unexported fields
}

func (*RangeNFollowingToCurrentRowFramer) FirstIdx added in v0.12.0

func (f *RangeNFollowingToCurrentRowFramer) FirstIdx() int

func (*RangeNFollowingToCurrentRowFramer) Interval added in v0.12.0

func (f *RangeNFollowingToCurrentRowFramer) Interval() (sql.WindowInterval, error)

func (*RangeNFollowingToCurrentRowFramer) LastIdx added in v0.12.0

func (f *RangeNFollowingToCurrentRowFramer) LastIdx() int

func (*RangeNFollowingToCurrentRowFramer) NewFramer added in v0.12.0

func (f *RangeNFollowingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RangeNFollowingToCurrentRowFramer) Next added in v0.12.0

func (f *RangeNFollowingToCurrentRowFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)

type RangeNFollowingToNFollowingFramer added in v0.12.0

type RangeNFollowingToNFollowingFramer struct {
	// contains filtered or unexported fields
}

func (*RangeNFollowingToNFollowingFramer) FirstIdx added in v0.12.0

func (f *RangeNFollowingToNFollowingFramer) FirstIdx() int

func (*RangeNFollowingToNFollowingFramer) Interval added in v0.12.0

func (f *RangeNFollowingToNFollowingFramer) Interval() (sql.WindowInterval, error)

func (*RangeNFollowingToNFollowingFramer) LastIdx added in v0.12.0

func (f *RangeNFollowingToNFollowingFramer) LastIdx() int

func (*RangeNFollowingToNFollowingFramer) NewFramer added in v0.12.0

func (f *RangeNFollowingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RangeNFollowingToNFollowingFramer) Next added in v0.12.0

func (f *RangeNFollowingToNFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)

type RangeNFollowingToNPrecedingFramer added in v0.12.0

type RangeNFollowingToNPrecedingFramer struct {
	// contains filtered or unexported fields
}

func (*RangeNFollowingToNPrecedingFramer) FirstIdx added in v0.12.0

func (f *RangeNFollowingToNPrecedingFramer) FirstIdx() int

func (*RangeNFollowingToNPrecedingFramer) Interval added in v0.12.0

func (f *RangeNFollowingToNPrecedingFramer) Interval() (sql.WindowInterval, error)

func (*RangeNFollowingToNPrecedingFramer) LastIdx added in v0.12.0

func (f *RangeNFollowingToNPrecedingFramer) LastIdx() int

func (*RangeNFollowingToNPrecedingFramer) NewFramer added in v0.12.0

func (f *RangeNFollowingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RangeNFollowingToNPrecedingFramer) Next added in v0.12.0

func (f *RangeNFollowingToNPrecedingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)

type RangeNFollowingToUnboundedFollowingFramer added in v0.12.0

type RangeNFollowingToUnboundedFollowingFramer struct {
	// contains filtered or unexported fields
}

func (*RangeNFollowingToUnboundedFollowingFramer) FirstIdx added in v0.12.0

func (f *RangeNFollowingToUnboundedFollowingFramer) FirstIdx() int

func (*RangeNFollowingToUnboundedFollowingFramer) Interval added in v0.12.0

func (f *RangeNFollowingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)

func (*RangeNFollowingToUnboundedFollowingFramer) LastIdx added in v0.12.0

func (f *RangeNFollowingToUnboundedFollowingFramer) LastIdx() int

func (*RangeNFollowingToUnboundedFollowingFramer) NewFramer added in v0.12.0

func (f *RangeNFollowingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RangeNFollowingToUnboundedFollowingFramer) Next added in v0.12.0

func (f *RangeNFollowingToUnboundedFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)

type RangeNPrecedingToCurrentRowFramer added in v0.12.0

type RangeNPrecedingToCurrentRowFramer struct {
	// contains filtered or unexported fields
}

func (*RangeNPrecedingToCurrentRowFramer) FirstIdx added in v0.12.0

func (f *RangeNPrecedingToCurrentRowFramer) FirstIdx() int

func (*RangeNPrecedingToCurrentRowFramer) Interval added in v0.12.0

func (f *RangeNPrecedingToCurrentRowFramer) Interval() (sql.WindowInterval, error)

func (*RangeNPrecedingToCurrentRowFramer) LastIdx added in v0.12.0

func (f *RangeNPrecedingToCurrentRowFramer) LastIdx() int

func (*RangeNPrecedingToCurrentRowFramer) NewFramer added in v0.12.0

func (f *RangeNPrecedingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RangeNPrecedingToCurrentRowFramer) Next added in v0.12.0

func (f *RangeNPrecedingToCurrentRowFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)

type RangeNPrecedingToNFollowingFramer added in v0.12.0

type RangeNPrecedingToNFollowingFramer struct {
	// contains filtered or unexported fields
}

func (*RangeNPrecedingToNFollowingFramer) FirstIdx added in v0.12.0

func (f *RangeNPrecedingToNFollowingFramer) FirstIdx() int

func (*RangeNPrecedingToNFollowingFramer) Interval added in v0.12.0

func (f *RangeNPrecedingToNFollowingFramer) Interval() (sql.WindowInterval, error)

func (*RangeNPrecedingToNFollowingFramer) LastIdx added in v0.12.0

func (f *RangeNPrecedingToNFollowingFramer) LastIdx() int

func (*RangeNPrecedingToNFollowingFramer) NewFramer added in v0.12.0

func (f *RangeNPrecedingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RangeNPrecedingToNFollowingFramer) Next added in v0.12.0

func (f *RangeNPrecedingToNFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)

type RangeNPrecedingToNPrecedingFramer added in v0.12.0

type RangeNPrecedingToNPrecedingFramer struct {
	// contains filtered or unexported fields
}

func (*RangeNPrecedingToNPrecedingFramer) FirstIdx added in v0.12.0

func (f *RangeNPrecedingToNPrecedingFramer) FirstIdx() int

func (*RangeNPrecedingToNPrecedingFramer) Interval added in v0.12.0

func (f *RangeNPrecedingToNPrecedingFramer) Interval() (sql.WindowInterval, error)

func (*RangeNPrecedingToNPrecedingFramer) LastIdx added in v0.12.0

func (f *RangeNPrecedingToNPrecedingFramer) LastIdx() int

func (*RangeNPrecedingToNPrecedingFramer) NewFramer added in v0.12.0

func (f *RangeNPrecedingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RangeNPrecedingToNPrecedingFramer) Next added in v0.12.0

func (f *RangeNPrecedingToNPrecedingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)

type RangeNPrecedingToUnboundedFollowingFramer added in v0.12.0

type RangeNPrecedingToUnboundedFollowingFramer struct {
	// contains filtered or unexported fields
}

func (*RangeNPrecedingToUnboundedFollowingFramer) FirstIdx added in v0.12.0

func (f *RangeNPrecedingToUnboundedFollowingFramer) FirstIdx() int

func (*RangeNPrecedingToUnboundedFollowingFramer) Interval added in v0.12.0

func (f *RangeNPrecedingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)

func (*RangeNPrecedingToUnboundedFollowingFramer) LastIdx added in v0.12.0

func (f *RangeNPrecedingToUnboundedFollowingFramer) LastIdx() int

func (*RangeNPrecedingToUnboundedFollowingFramer) NewFramer added in v0.12.0

func (f *RangeNPrecedingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RangeNPrecedingToUnboundedFollowingFramer) Next added in v0.12.0

func (f *RangeNPrecedingToUnboundedFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)

type RangeUnboundedPrecedingToCurrentRowFramer added in v0.12.0

type RangeUnboundedPrecedingToCurrentRowFramer struct {
	// contains filtered or unexported fields
}

func (*RangeUnboundedPrecedingToCurrentRowFramer) FirstIdx added in v0.12.0

func (f *RangeUnboundedPrecedingToCurrentRowFramer) FirstIdx() int

func (*RangeUnboundedPrecedingToCurrentRowFramer) Interval added in v0.12.0

func (f *RangeUnboundedPrecedingToCurrentRowFramer) Interval() (sql.WindowInterval, error)

func (*RangeUnboundedPrecedingToCurrentRowFramer) LastIdx added in v0.12.0

func (f *RangeUnboundedPrecedingToCurrentRowFramer) LastIdx() int

func (*RangeUnboundedPrecedingToCurrentRowFramer) NewFramer added in v0.12.0

func (f *RangeUnboundedPrecedingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RangeUnboundedPrecedingToCurrentRowFramer) Next added in v0.12.0

func (f *RangeUnboundedPrecedingToCurrentRowFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)

type RangeUnboundedPrecedingToNFollowingFramer added in v0.12.0

type RangeUnboundedPrecedingToNFollowingFramer struct {
	// contains filtered or unexported fields
}

func (*RangeUnboundedPrecedingToNFollowingFramer) FirstIdx added in v0.12.0

func (f *RangeUnboundedPrecedingToNFollowingFramer) FirstIdx() int

func (*RangeUnboundedPrecedingToNFollowingFramer) Interval added in v0.12.0

func (f *RangeUnboundedPrecedingToNFollowingFramer) Interval() (sql.WindowInterval, error)

func (*RangeUnboundedPrecedingToNFollowingFramer) LastIdx added in v0.12.0

func (f *RangeUnboundedPrecedingToNFollowingFramer) LastIdx() int

func (*RangeUnboundedPrecedingToNFollowingFramer) NewFramer added in v0.12.0

func (f *RangeUnboundedPrecedingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RangeUnboundedPrecedingToNFollowingFramer) Next added in v0.12.0

func (f *RangeUnboundedPrecedingToNFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)

type RangeUnboundedPrecedingToNPrecedingFramer added in v0.12.0

type RangeUnboundedPrecedingToNPrecedingFramer struct {
	// contains filtered or unexported fields
}

func (*RangeUnboundedPrecedingToNPrecedingFramer) FirstIdx added in v0.12.0

func (f *RangeUnboundedPrecedingToNPrecedingFramer) FirstIdx() int

func (*RangeUnboundedPrecedingToNPrecedingFramer) Interval added in v0.12.0

func (f *RangeUnboundedPrecedingToNPrecedingFramer) Interval() (sql.WindowInterval, error)

func (*RangeUnboundedPrecedingToNPrecedingFramer) LastIdx added in v0.12.0

func (f *RangeUnboundedPrecedingToNPrecedingFramer) LastIdx() int

func (*RangeUnboundedPrecedingToNPrecedingFramer) NewFramer added in v0.12.0

func (f *RangeUnboundedPrecedingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RangeUnboundedPrecedingToNPrecedingFramer) Next added in v0.12.0

func (f *RangeUnboundedPrecedingToNPrecedingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)

type RangeUnboundedPrecedingToUnboundedFollowingFramer added in v0.12.0

type RangeUnboundedPrecedingToUnboundedFollowingFramer struct {
	// contains filtered or unexported fields
}

func (*RangeUnboundedPrecedingToUnboundedFollowingFramer) FirstIdx added in v0.12.0

func (f *RangeUnboundedPrecedingToUnboundedFollowingFramer) FirstIdx() int

func (*RangeUnboundedPrecedingToUnboundedFollowingFramer) Interval added in v0.12.0

func (f *RangeUnboundedPrecedingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)

func (*RangeUnboundedPrecedingToUnboundedFollowingFramer) LastIdx added in v0.12.0

func (f *RangeUnboundedPrecedingToUnboundedFollowingFramer) LastIdx() int

func (*RangeUnboundedPrecedingToUnboundedFollowingFramer) NewFramer added in v0.12.0

func (f *RangeUnboundedPrecedingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RangeUnboundedPrecedingToUnboundedFollowingFramer) Next added in v0.12.0

func (f *RangeUnboundedPrecedingToUnboundedFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)

type Rank added in v0.14.0

type Rank struct {
	// contains filtered or unexported fields
}

func NewRank added in v0.14.0

func NewRank(orderBy []sql.Expression) *Rank

func (Rank) Compute added in v0.14.0

func (a Rank) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}

Compute returns the number of elements before the current peer group (rank) + 1. ex: [1, 2, 2, 2, 3, 3, 3, 4, 5, 5, 6] => every 3 returns uint64(5) because there are 4 values less than 3

func (Rank) DefaultFramer added in v0.14.0

func (a Rank) DefaultFramer() sql.WindowFramer

func (Rank) Dispose added in v0.14.0

func (a Rank) Dispose()

func (Rank) NewSlidingFrameInterval added in v0.14.0

func (a Rank) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (Rank) StartPartition added in v0.14.0

func (a Rank) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error

func (Rank) WithWindow added in v0.14.0

func (a Rank) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)

type RowNumber added in v0.12.0

type RowNumber struct {
	// contains filtered or unexported fields
}

func NewRowNumber added in v0.12.0

func NewRowNumber() *RowNumber

func (*RowNumber) Compute added in v0.12.0

func (a *RowNumber) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}

func (*RowNumber) DefaultFramer added in v0.12.0

func (a *RowNumber) DefaultFramer() sql.WindowFramer

DefaultFramer returns a NewPartitionFramer

func (*RowNumber) Dispose added in v0.12.0

func (a *RowNumber) Dispose()

func (*RowNumber) NewSlidingFrameInterval added in v0.12.0

func (a *RowNumber) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (*RowNumber) StartPartition added in v0.12.0

func (a *RowNumber) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error

func (*RowNumber) WithWindow added in v0.12.0

func (a *RowNumber) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)

type RowsCurrentRowToCurrentRowFramer added in v0.12.0

type RowsCurrentRowToCurrentRowFramer struct {
	// contains filtered or unexported fields
}

func (*RowsCurrentRowToCurrentRowFramer) FirstIdx added in v0.12.0

func (f *RowsCurrentRowToCurrentRowFramer) FirstIdx() int

func (*RowsCurrentRowToCurrentRowFramer) Interval added in v0.12.0

func (f *RowsCurrentRowToCurrentRowFramer) Interval() (sql.WindowInterval, error)

func (*RowsCurrentRowToCurrentRowFramer) LastIdx added in v0.12.0

func (f *RowsCurrentRowToCurrentRowFramer) LastIdx() int

func (*RowsCurrentRowToCurrentRowFramer) NewFramer added in v0.12.0

func (f *RowsCurrentRowToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RowsCurrentRowToCurrentRowFramer) Next added in v0.12.0

func (f *RowsCurrentRowToCurrentRowFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

type RowsCurrentRowToNFollowingFramer added in v0.12.0

type RowsCurrentRowToNFollowingFramer struct {
	// contains filtered or unexported fields
}

func (*RowsCurrentRowToNFollowingFramer) FirstIdx added in v0.12.0

func (f *RowsCurrentRowToNFollowingFramer) FirstIdx() int

func (*RowsCurrentRowToNFollowingFramer) Interval added in v0.12.0

func (f *RowsCurrentRowToNFollowingFramer) Interval() (sql.WindowInterval, error)

func (*RowsCurrentRowToNFollowingFramer) LastIdx added in v0.12.0

func (f *RowsCurrentRowToNFollowingFramer) LastIdx() int

func (*RowsCurrentRowToNFollowingFramer) NewFramer added in v0.12.0

func (f *RowsCurrentRowToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RowsCurrentRowToNFollowingFramer) Next added in v0.12.0

func (f *RowsCurrentRowToNFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

type RowsCurrentRowToNPrecedingFramer added in v0.12.0

type RowsCurrentRowToNPrecedingFramer struct {
	// contains filtered or unexported fields
}

func (*RowsCurrentRowToNPrecedingFramer) FirstIdx added in v0.12.0

func (f *RowsCurrentRowToNPrecedingFramer) FirstIdx() int

func (*RowsCurrentRowToNPrecedingFramer) Interval added in v0.12.0

func (f *RowsCurrentRowToNPrecedingFramer) Interval() (sql.WindowInterval, error)

func (*RowsCurrentRowToNPrecedingFramer) LastIdx added in v0.12.0

func (f *RowsCurrentRowToNPrecedingFramer) LastIdx() int

func (*RowsCurrentRowToNPrecedingFramer) NewFramer added in v0.12.0

func (f *RowsCurrentRowToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RowsCurrentRowToNPrecedingFramer) Next added in v0.12.0

func (f *RowsCurrentRowToNPrecedingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

type RowsCurrentRowToUnboundedFollowingFramer added in v0.12.0

type RowsCurrentRowToUnboundedFollowingFramer struct {
	// contains filtered or unexported fields
}

func (*RowsCurrentRowToUnboundedFollowingFramer) FirstIdx added in v0.12.0

func (f *RowsCurrentRowToUnboundedFollowingFramer) FirstIdx() int

func (*RowsCurrentRowToUnboundedFollowingFramer) Interval added in v0.12.0

func (f *RowsCurrentRowToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)

func (*RowsCurrentRowToUnboundedFollowingFramer) LastIdx added in v0.12.0

func (f *RowsCurrentRowToUnboundedFollowingFramer) LastIdx() int

func (*RowsCurrentRowToUnboundedFollowingFramer) NewFramer added in v0.12.0

func (f *RowsCurrentRowToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RowsCurrentRowToUnboundedFollowingFramer) Next added in v0.12.0

func (f *RowsCurrentRowToUnboundedFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

type RowsNFollowingToCurrentRowFramer added in v0.12.0

type RowsNFollowingToCurrentRowFramer struct {
	// contains filtered or unexported fields
}

func (*RowsNFollowingToCurrentRowFramer) FirstIdx added in v0.12.0

func (f *RowsNFollowingToCurrentRowFramer) FirstIdx() int

func (*RowsNFollowingToCurrentRowFramer) Interval added in v0.12.0

func (f *RowsNFollowingToCurrentRowFramer) Interval() (sql.WindowInterval, error)

func (*RowsNFollowingToCurrentRowFramer) LastIdx added in v0.12.0

func (f *RowsNFollowingToCurrentRowFramer) LastIdx() int

func (*RowsNFollowingToCurrentRowFramer) NewFramer added in v0.12.0

func (f *RowsNFollowingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RowsNFollowingToCurrentRowFramer) Next added in v0.12.0

func (f *RowsNFollowingToCurrentRowFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

type RowsNFollowingToNFollowingFramer added in v0.12.0

type RowsNFollowingToNFollowingFramer struct {
	// contains filtered or unexported fields
}

func (*RowsNFollowingToNFollowingFramer) FirstIdx added in v0.12.0

func (f *RowsNFollowingToNFollowingFramer) FirstIdx() int

func (*RowsNFollowingToNFollowingFramer) Interval added in v0.12.0

func (f *RowsNFollowingToNFollowingFramer) Interval() (sql.WindowInterval, error)

func (*RowsNFollowingToNFollowingFramer) LastIdx added in v0.12.0

func (f *RowsNFollowingToNFollowingFramer) LastIdx() int

func (*RowsNFollowingToNFollowingFramer) NewFramer added in v0.12.0

func (f *RowsNFollowingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RowsNFollowingToNFollowingFramer) Next added in v0.12.0

func (f *RowsNFollowingToNFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

type RowsNFollowingToNPrecedingFramer added in v0.12.0

type RowsNFollowingToNPrecedingFramer struct {
	// contains filtered or unexported fields
}

func (*RowsNFollowingToNPrecedingFramer) FirstIdx added in v0.12.0

func (f *RowsNFollowingToNPrecedingFramer) FirstIdx() int

func (*RowsNFollowingToNPrecedingFramer) Interval added in v0.12.0

func (f *RowsNFollowingToNPrecedingFramer) Interval() (sql.WindowInterval, error)

func (*RowsNFollowingToNPrecedingFramer) LastIdx added in v0.12.0

func (f *RowsNFollowingToNPrecedingFramer) LastIdx() int

func (*RowsNFollowingToNPrecedingFramer) NewFramer added in v0.12.0

func (f *RowsNFollowingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RowsNFollowingToNPrecedingFramer) Next added in v0.12.0

func (f *RowsNFollowingToNPrecedingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

type RowsNFollowingToUnboundedFollowingFramer added in v0.12.0

type RowsNFollowingToUnboundedFollowingFramer struct {
	// contains filtered or unexported fields
}

func (*RowsNFollowingToUnboundedFollowingFramer) FirstIdx added in v0.12.0

func (f *RowsNFollowingToUnboundedFollowingFramer) FirstIdx() int

func (*RowsNFollowingToUnboundedFollowingFramer) Interval added in v0.12.0

func (f *RowsNFollowingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)

func (*RowsNFollowingToUnboundedFollowingFramer) LastIdx added in v0.12.0

func (f *RowsNFollowingToUnboundedFollowingFramer) LastIdx() int

func (*RowsNFollowingToUnboundedFollowingFramer) NewFramer added in v0.12.0

func (f *RowsNFollowingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RowsNFollowingToUnboundedFollowingFramer) Next added in v0.12.0

func (f *RowsNFollowingToUnboundedFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

type RowsNPrecedingToCurrentRowFramer added in v0.12.0

type RowsNPrecedingToCurrentRowFramer struct {
	// contains filtered or unexported fields
}

func (*RowsNPrecedingToCurrentRowFramer) FirstIdx added in v0.12.0

func (f *RowsNPrecedingToCurrentRowFramer) FirstIdx() int

func (*RowsNPrecedingToCurrentRowFramer) Interval added in v0.12.0

func (f *RowsNPrecedingToCurrentRowFramer) Interval() (sql.WindowInterval, error)

func (*RowsNPrecedingToCurrentRowFramer) LastIdx added in v0.12.0

func (f *RowsNPrecedingToCurrentRowFramer) LastIdx() int

func (*RowsNPrecedingToCurrentRowFramer) NewFramer added in v0.12.0

func (f *RowsNPrecedingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RowsNPrecedingToCurrentRowFramer) Next added in v0.12.0

func (f *RowsNPrecedingToCurrentRowFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

type RowsNPrecedingToNFollowingFramer added in v0.12.0

type RowsNPrecedingToNFollowingFramer struct {
	// contains filtered or unexported fields
}

func (*RowsNPrecedingToNFollowingFramer) FirstIdx added in v0.12.0

func (f *RowsNPrecedingToNFollowingFramer) FirstIdx() int

func (*RowsNPrecedingToNFollowingFramer) Interval added in v0.12.0

func (f *RowsNPrecedingToNFollowingFramer) Interval() (sql.WindowInterval, error)

func (*RowsNPrecedingToNFollowingFramer) LastIdx added in v0.12.0

func (f *RowsNPrecedingToNFollowingFramer) LastIdx() int

func (*RowsNPrecedingToNFollowingFramer) NewFramer added in v0.12.0

func (f *RowsNPrecedingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RowsNPrecedingToNFollowingFramer) Next added in v0.12.0

func (f *RowsNPrecedingToNFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

type RowsNPrecedingToNPrecedingFramer added in v0.12.0

type RowsNPrecedingToNPrecedingFramer struct {
	// contains filtered or unexported fields
}

func (*RowsNPrecedingToNPrecedingFramer) FirstIdx added in v0.12.0

func (f *RowsNPrecedingToNPrecedingFramer) FirstIdx() int

func (*RowsNPrecedingToNPrecedingFramer) Interval added in v0.12.0

func (f *RowsNPrecedingToNPrecedingFramer) Interval() (sql.WindowInterval, error)

func (*RowsNPrecedingToNPrecedingFramer) LastIdx added in v0.12.0

func (f *RowsNPrecedingToNPrecedingFramer) LastIdx() int

func (*RowsNPrecedingToNPrecedingFramer) NewFramer added in v0.12.0

func (f *RowsNPrecedingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RowsNPrecedingToNPrecedingFramer) Next added in v0.12.0

func (f *RowsNPrecedingToNPrecedingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

type RowsNPrecedingToUnboundedFollowingFramer added in v0.12.0

type RowsNPrecedingToUnboundedFollowingFramer struct {
	// contains filtered or unexported fields
}

func (*RowsNPrecedingToUnboundedFollowingFramer) FirstIdx added in v0.12.0

func (f *RowsNPrecedingToUnboundedFollowingFramer) FirstIdx() int

func (*RowsNPrecedingToUnboundedFollowingFramer) Interval added in v0.12.0

func (f *RowsNPrecedingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)

func (*RowsNPrecedingToUnboundedFollowingFramer) LastIdx added in v0.12.0

func (f *RowsNPrecedingToUnboundedFollowingFramer) LastIdx() int

func (*RowsNPrecedingToUnboundedFollowingFramer) NewFramer added in v0.12.0

func (f *RowsNPrecedingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RowsNPrecedingToUnboundedFollowingFramer) Next added in v0.12.0

func (f *RowsNPrecedingToUnboundedFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

type RowsUnboundedPrecedingToCurrentRowFramer added in v0.12.0

type RowsUnboundedPrecedingToCurrentRowFramer struct {
	// contains filtered or unexported fields
}

func NewUnboundedPrecedingToCurrentRowFramer added in v0.12.0

func NewUnboundedPrecedingToCurrentRowFramer() *RowsUnboundedPrecedingToCurrentRowFramer

NewUnboundedPrecedingToCurrentRowFramer generates sql.WindowInterval from the first row in a partition to the current row.

Ex: partition = [0, 1, 2, 3, 4, 5] => frames: {0,0}, {0,1}, {0,2}, {0,3}, {0,4}, {0,5} rows: [0], [0,1], [0,1,2], [1,2,3,4], [1,2,3,4], [1,2,3,4,5]

func (*RowsUnboundedPrecedingToCurrentRowFramer) FirstIdx added in v0.12.0

func (f *RowsUnboundedPrecedingToCurrentRowFramer) FirstIdx() int

func (*RowsUnboundedPrecedingToCurrentRowFramer) Interval added in v0.12.0

func (f *RowsUnboundedPrecedingToCurrentRowFramer) Interval() (sql.WindowInterval, error)

func (*RowsUnboundedPrecedingToCurrentRowFramer) LastIdx added in v0.12.0

func (f *RowsUnboundedPrecedingToCurrentRowFramer) LastIdx() int

func (*RowsUnboundedPrecedingToCurrentRowFramer) NewFramer added in v0.12.0

func (f *RowsUnboundedPrecedingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RowsUnboundedPrecedingToCurrentRowFramer) Next added in v0.12.0

func (f *RowsUnboundedPrecedingToCurrentRowFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

type RowsUnboundedPrecedingToNFollowingFramer added in v0.12.0

type RowsUnboundedPrecedingToNFollowingFramer struct {
	// contains filtered or unexported fields
}

func (*RowsUnboundedPrecedingToNFollowingFramer) FirstIdx added in v0.12.0

func (f *RowsUnboundedPrecedingToNFollowingFramer) FirstIdx() int

func (*RowsUnboundedPrecedingToNFollowingFramer) Interval added in v0.12.0

func (f *RowsUnboundedPrecedingToNFollowingFramer) Interval() (sql.WindowInterval, error)

func (*RowsUnboundedPrecedingToNFollowingFramer) LastIdx added in v0.12.0

func (f *RowsUnboundedPrecedingToNFollowingFramer) LastIdx() int

func (*RowsUnboundedPrecedingToNFollowingFramer) NewFramer added in v0.12.0

func (f *RowsUnboundedPrecedingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RowsUnboundedPrecedingToNFollowingFramer) Next added in v0.12.0

func (f *RowsUnboundedPrecedingToNFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

type RowsUnboundedPrecedingToNPrecedingFramer added in v0.12.0

type RowsUnboundedPrecedingToNPrecedingFramer struct {
	// contains filtered or unexported fields
}

func (*RowsUnboundedPrecedingToNPrecedingFramer) FirstIdx added in v0.12.0

func (f *RowsUnboundedPrecedingToNPrecedingFramer) FirstIdx() int

func (*RowsUnboundedPrecedingToNPrecedingFramer) Interval added in v0.12.0

func (f *RowsUnboundedPrecedingToNPrecedingFramer) Interval() (sql.WindowInterval, error)

func (*RowsUnboundedPrecedingToNPrecedingFramer) LastIdx added in v0.12.0

func (f *RowsUnboundedPrecedingToNPrecedingFramer) LastIdx() int

func (*RowsUnboundedPrecedingToNPrecedingFramer) NewFramer added in v0.12.0

func (f *RowsUnboundedPrecedingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RowsUnboundedPrecedingToNPrecedingFramer) Next added in v0.12.0

func (f *RowsUnboundedPrecedingToNPrecedingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

type RowsUnboundedPrecedingToUnboundedFollowingFramer added in v0.12.0

type RowsUnboundedPrecedingToUnboundedFollowingFramer struct {
	// contains filtered or unexported fields
}

func (*RowsUnboundedPrecedingToUnboundedFollowingFramer) FirstIdx added in v0.12.0

func (f *RowsUnboundedPrecedingToUnboundedFollowingFramer) FirstIdx() int

func (*RowsUnboundedPrecedingToUnboundedFollowingFramer) Interval added in v0.12.0

func (f *RowsUnboundedPrecedingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)

func (*RowsUnboundedPrecedingToUnboundedFollowingFramer) LastIdx added in v0.12.0

func (f *RowsUnboundedPrecedingToUnboundedFollowingFramer) LastIdx() int

func (*RowsUnboundedPrecedingToUnboundedFollowingFramer) NewFramer added in v0.12.0

func (f *RowsUnboundedPrecedingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)

func (*RowsUnboundedPrecedingToUnboundedFollowingFramer) Next added in v0.12.0

func (f *RowsUnboundedPrecedingToUnboundedFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)

type Sum

type Sum struct {
	// contains filtered or unexported fields
}

func NewSum

func NewSum(e sql.Expression) *Sum

func (*Sum) Children added in v0.12.0

func (a *Sum) Children() []sql.Expression

func (Sum) Description added in v0.12.0

func (a Sum) Description() string

func (*Sum) Eval

func (a *Sum) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (Sum) FunctionName

func (a Sum) FunctionName() string

func (*Sum) IsNullable added in v0.12.0

func (a *Sum) IsNullable() bool

func (*Sum) NewBuffer

func (a *Sum) NewBuffer() (sql.AggregationBuffer, error)

func (*Sum) NewWindowFunction added in v0.12.0

func (a *Sum) NewWindowFunction() (sql.WindowFunction, error)

func (*Sum) Resolved added in v0.12.0

func (a *Sum) Resolved() bool

func (*Sum) String

func (a *Sum) String() string

func (*Sum) Type

func (a *Sum) Type() sql.Type

func (*Sum) Window added in v0.12.0

func (a *Sum) Window() *sql.WindowDefinition

func (*Sum) WithChildren

func (a *Sum) WithChildren(children ...sql.Expression) (sql.Expression, error)

func (*Sum) WithWindow added in v0.12.0

func (a *Sum) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)

type SumAgg added in v0.12.0

type SumAgg struct {
	// contains filtered or unexported fields
}

func NewSumAgg added in v0.12.0

func NewSumAgg(e sql.Expression) *SumAgg

func (*SumAgg) Compute added in v0.12.0

func (a *SumAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}

func (*SumAgg) DefaultFramer added in v0.12.0

func (a *SumAgg) DefaultFramer() sql.WindowFramer

DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer

func (*SumAgg) Dispose added in v0.12.0

func (a *SumAgg) Dispose()

func (*SumAgg) NewSlidingFrameInterval added in v0.12.0

func (a *SumAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (*SumAgg) StartPartition added in v0.12.0

func (a *SumAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error

func (*SumAgg) WithWindow added in v0.12.0

func (a *SumAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)

type WindowIter added in v0.12.0

type WindowIter struct {
	// contains filtered or unexported fields
}

WindowIter is a wrapper that evaluates a set of WindowPartitionIter.

The current implementation has 3 steps: 1. Materialize [iter] and duplicate a sql.WindowBuffer for each partition. 2. Collect rows from child partitions. 3. Rearrange partition results into the projected ordering given by [outputOrdinals].

We assume [outputOrdinals] is appropriately sized for [partitionIters].

func NewWindowIter added in v0.12.0

func NewWindowIter(partitionIters []*WindowPartitionIter, outputOrdinals [][]int, iter sql.RowIter) *WindowIter

func (*WindowIter) Close added in v0.12.0

func (i *WindowIter) Close(ctx *sql.Context) error

Close implements sql.RowIter

func (*WindowIter) Dispose added in v0.12.0

func (i *WindowIter) Dispose()

Dispose implements sql.Disposable

func (*WindowIter) Next added in v0.12.0

func (i *WindowIter) Next(ctx *sql.Context) (sql.Row, error)

Next implements sql.RowIter

type WindowPartition added in v0.12.0

type WindowPartition struct {
	PartitionBy []sql.Expression
	SortBy      sql.SortFields
	Aggs        []*Aggregation
}

WindowPartition is an Aggregation set with unique partition and sorting keys. There may be several WindowPartitions in one query, but each has unique key set. A WindowPartitionIter is used to evaluate a WindowPartition with a specific sql.RowIter.

func NewWindowPartition added in v0.12.0

func NewWindowPartition(partitionBy []sql.Expression, sortBy sql.SortFields, aggs []*Aggregation) *WindowPartition

func (*WindowPartition) AddAggregation added in v0.12.0

func (w *WindowPartition) AddAggregation(agg *Aggregation)

type WindowPartitionIter added in v0.12.0

type WindowPartitionIter struct {
	// contains filtered or unexported fields
}

WindowPartitionIter evaluates a WindowPartition with a sql.RowIter child. A parent WindowIter is expected to maintain the projection ordering for WindowPartition output columns.

WindowPartitionIter will return rows sorted in the same order generated by [child]. This is accomplished privately by appending the sort ordering index to [i.input] rows during materializeInput, and removing after sortAndFilterOutput.

Next currently materializes [i.input] and [i.output] before returning the first result, regardless of Limit or other expressions.

func NewWindowPartitionIter added in v0.12.0

func NewWindowPartitionIter(windowBlock *WindowPartition) *WindowPartitionIter

func (*WindowPartitionIter) Close added in v0.12.0

func (i *WindowPartitionIter) Close(ctx *sql.Context) error

func (*WindowPartitionIter) Dispose added in v0.12.0

func (i *WindowPartitionIter) Dispose()

func (*WindowPartitionIter) Next added in v0.12.0

func (i *WindowPartitionIter) Next(ctx *sql.Context) (sql.Row, error)

func (*WindowPartitionIter) WindowBlock added in v0.12.0

func (i *WindowPartitionIter) WindowBlock() *WindowPartition

type WindowedJSONArrayAgg added in v0.12.0

type WindowedJSONArrayAgg struct {
	// contains filtered or unexported fields
}

func NewJsonArrayAgg added in v0.12.0

func NewJsonArrayAgg(expr sql.Expression) *WindowedJSONArrayAgg

func (*WindowedJSONArrayAgg) Compute added in v0.12.0

func (a *WindowedJSONArrayAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}

func (*WindowedJSONArrayAgg) DefaultFramer added in v0.12.0

func (a *WindowedJSONArrayAgg) DefaultFramer() sql.WindowFramer

DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer

func (*WindowedJSONArrayAgg) Dispose added in v0.12.0

func (a *WindowedJSONArrayAgg) Dispose()

func (*WindowedJSONArrayAgg) NewSlidingFrameInterval added in v0.12.0

func (a *WindowedJSONArrayAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (*WindowedJSONArrayAgg) StartPartition added in v0.12.0

func (a *WindowedJSONArrayAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error

func (*WindowedJSONArrayAgg) WithWindow added in v0.12.0

type WindowedJSONObjectAgg added in v0.12.0

type WindowedJSONObjectAgg struct {
	// contains filtered or unexported fields
}

func NewWindowedJSONObjectAgg added in v0.12.0

func NewWindowedJSONObjectAgg(j *JSONObjectAgg) *WindowedJSONObjectAgg

func (*WindowedJSONObjectAgg) Compute added in v0.12.0

func (a *WindowedJSONObjectAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}

func (*WindowedJSONObjectAgg) DefaultFramer added in v0.12.0

func (a *WindowedJSONObjectAgg) DefaultFramer() sql.WindowFramer

DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer

func (*WindowedJSONObjectAgg) Dispose added in v0.12.0

func (a *WindowedJSONObjectAgg) Dispose()

func (*WindowedJSONObjectAgg) NewSlidingFrameInterval added in v0.12.0

func (a *WindowedJSONObjectAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)

func (*WindowedJSONObjectAgg) StartPartition added in v0.12.0

func (a *WindowedJSONObjectAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error

func (*WindowedJSONObjectAgg) WithWindow added in v0.12.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL