expression

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DecimalLongLongDigits decimal longlong digits.
	DecimalLongLongDigits = 22
	// FloatDigits float decimal precision.
	FloatDigits = 6
	// DoubleDigits double decimal precision.
	DoubleDigits = 15
)

Variables

This section is empty.

Functions

func GetResults

func GetResults(aggrs []*Aggregation, evalCtxs []*AggEvaluateContext, x []sqltypes.Value) ([]sqltypes.Value, []int)

GetResults will be called when all data have been processed.

Types

type AggEvaluateContext

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

AggEvaluateContext is used to store intermediate result when calculating aggregate functions.

func NewAggEvalCtxs

func NewAggEvalCtxs(aggrs []*Aggregation, x []sqltypes.Value) []*AggEvaluateContext

NewAggEvalCtxs new evalCtxs.

type Aggregation

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

Aggregation operator.

func NewAggregations

func NewAggregations(plans []planner.Aggregator, isPushDown bool, fields []*querypb.Field) []*Aggregation

NewAggregations new aggrs based on plans.

func (*Aggregation) FixField

func (aggr *Aggregation) FixField(field *querypb.Field)

FixField used to fix querypb.Field lenght and decimal.

func (*Aggregation) GetResult

func (aggr *Aggregation) GetResult(evalCtx *AggEvaluateContext) sqltypes.Value

GetResult used to get Value finally.

func (*Aggregation) InitEvalCtx

func (aggr *Aggregation) InitEvalCtx(x []sqltypes.Value) *AggEvaluateContext

InitEvalCtx used to init the AggEvaluateContext.

func (*Aggregation) Update

func (aggr *Aggregation) Update(x []sqltypes.Value, evalCtx *AggEvaluateContext)

Update during executing.

Jump to

Keyboard shortcuts

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