aggfuncs

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggFunctionType

type AggFunctionType int
const (
	SumAggregateFunctionType AggFunctionType = iota
	CountAggregateFunctionType
	FirstRowAggregateFunctionType
)

type AggState

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

func NewAggState

func NewAggState(size int) *AggState

func (*AggState) GetDecimal

func (as *AggState) GetDecimal(index int) common.Decimal

func (*AggState) GetExtraState

func (as *AggState) GetExtraState(index int) []byte

func (*AggState) GetFloat64

func (as *AggState) GetFloat64(index int) float64

func (*AggState) GetInt64

func (as *AggState) GetInt64(index int) int64

func (*AggState) GetString

func (as *AggState) GetString(index int) string

func (*AggState) GetTimestamp

func (as *AggState) GetTimestamp(index int) (common.Timestamp, error)

func (*AggState) IsChanged

func (as *AggState) IsChanged() bool

func (*AggState) IsNull

func (as *AggState) IsNull(index int) bool

func (*AggState) IsSet

func (as *AggState) IsSet(index int) bool

func (*AggState) SetDecimal

func (as *AggState) SetDecimal(index int, val common.Decimal) error

func (*AggState) SetExtraState

func (as *AggState) SetExtraState(index int, extraState []byte)

func (*AggState) SetFloat64

func (as *AggState) SetFloat64(index int, val float64)

func (*AggState) SetInt64

func (as *AggState) SetInt64(index int, val int64)

func (*AggState) SetNull

func (as *AggState) SetNull(index int)

func (*AggState) SetString

func (as *AggState) SetString(index int, val string)

func (*AggState) SetTimestamp

func (as *AggState) SetTimestamp(index int, val common.Timestamp) error

func (*AggState) SetUnchanged added in v0.1.6

func (as *AggState) SetUnchanged()

type AggregateFunction

type AggregateFunction interface {
	EvalInt64(value int64, null bool, aggState *AggState, index int, reverse bool) error
	EvalFloat64(value float64, null bool, aggState *AggState, index int, reverse bool) error
	EvalString(value string, null bool, aggState *AggState, index int, reverse bool) error
	EvalTimestamp(value common.Timestamp, null bool, aggState *AggState, index int, reverse bool) error
	EvalDecimal(value common.Decimal, null bool, aggState *AggState, index int, reverse bool) error

	ValueType() common.ColumnType
	ArgExpression() *common.Expression
	RequiresExtraState() bool
}

func NewAggregateFunction

func NewAggregateFunction(argExpression *common.Expression, funcType AggFunctionType, valueType common.ColumnType) (AggregateFunction, error)

type CountAggregateFunction

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

func (*CountAggregateFunction) ArgExpression

func (b *CountAggregateFunction) ArgExpression() *common.Expression

func (*CountAggregateFunction) EvalDecimal

func (b *CountAggregateFunction) EvalDecimal(value common.Decimal, null bool, aggState *AggState, index int, reverse bool) error

func (*CountAggregateFunction) EvalFloat64

func (b *CountAggregateFunction) EvalFloat64(value float64, null bool, aggState *AggState, index int, reverse bool) error

func (*CountAggregateFunction) EvalInt64

func (c *CountAggregateFunction) EvalInt64(value int64, null bool, aggState *AggState, index int, reverse bool) error

func (*CountAggregateFunction) EvalString

func (b *CountAggregateFunction) EvalString(value string, null bool, aggState *AggState, index int, reverse bool) error

func (*CountAggregateFunction) EvalTimestamp

func (b *CountAggregateFunction) EvalTimestamp(value common.Timestamp, null bool, aggState *AggState, index int, reverse bool) error

func (*CountAggregateFunction) RequiresExtraState

func (b *CountAggregateFunction) RequiresExtraState() bool

func (*CountAggregateFunction) ValueType

func (b *CountAggregateFunction) ValueType() common.ColumnType

type FirstRowAggregateFunction

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

func (*FirstRowAggregateFunction) ArgExpression

func (b *FirstRowAggregateFunction) ArgExpression() *common.Expression

func (*FirstRowAggregateFunction) EvalDecimal

func (f *FirstRowAggregateFunction) EvalDecimal(value common.Decimal, null bool, aggState *AggState, index int, reverse bool) error

func (*FirstRowAggregateFunction) EvalFloat64

func (f *FirstRowAggregateFunction) EvalFloat64(value float64, null bool, aggState *AggState, index int, reverse bool) error

func (*FirstRowAggregateFunction) EvalInt64

func (f *FirstRowAggregateFunction) EvalInt64(value int64, null bool, aggState *AggState, index int, reverse bool) error

func (*FirstRowAggregateFunction) EvalString

func (f *FirstRowAggregateFunction) EvalString(value string, null bool, aggState *AggState, index int, reverse bool) error

func (*FirstRowAggregateFunction) EvalTimestamp

func (f *FirstRowAggregateFunction) EvalTimestamp(value common.Timestamp, null bool, aggState *AggState, index int, reverse bool) error

func (*FirstRowAggregateFunction) RequiresExtraState

func (b *FirstRowAggregateFunction) RequiresExtraState() bool

func (*FirstRowAggregateFunction) ValueType

func (b *FirstRowAggregateFunction) ValueType() common.ColumnType

type SumAggregateFunction

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

func (*SumAggregateFunction) ArgExpression

func (b *SumAggregateFunction) ArgExpression() *common.Expression

func (*SumAggregateFunction) EvalDecimal

func (s *SumAggregateFunction) EvalDecimal(value common.Decimal, null bool, aggState *AggState, index int, reverse bool) error

func (*SumAggregateFunction) EvalFloat64

func (s *SumAggregateFunction) EvalFloat64(value float64, null bool, aggState *AggState, index int, reverse bool) error

func (*SumAggregateFunction) EvalInt64

func (b *SumAggregateFunction) EvalInt64(value int64, null bool, aggState *AggState, index int, reverse bool) error

func (*SumAggregateFunction) EvalString

func (b *SumAggregateFunction) EvalString(value string, null bool, aggState *AggState, index int, reverse bool) error

func (*SumAggregateFunction) EvalTimestamp

func (b *SumAggregateFunction) EvalTimestamp(value common.Timestamp, null bool, aggState *AggState, index int, reverse bool) error

func (*SumAggregateFunction) RequiresExtraState

func (b *SumAggregateFunction) RequiresExtraState() bool

func (*SumAggregateFunction) ValueType

func (b *SumAggregateFunction) ValueType() common.ColumnType

Jump to

Keyboard shortcuts

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