sample

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Argument

type Argument struct {

	// it determines which sample action (random sample by rows / percents, sample by order and so on) to take.
	Type int

	Rows     int
	Percents float64

	// sample(expression1, expression2, ..., number)'s expression.
	SampleExprs []*plan.Expr

	// group by expr1, expr2 ...
	GroupExprs []*plan.Expr

	IBucket, NBucket int
	// contains filtered or unexported fields
}

func GenerateFromPipelineOperator

func GenerateFromPipelineOperator(opr *pipeline.Instruction) *Argument

func NewMergeSample

func NewMergeSample(rowSampleArg *Argument) *Argument

func NewSampleByPercent

func NewSampleByPercent(percent float64, sampleExprs, groupExprs []*plan.Expr) *Argument

func NewSampleByRows

func NewSampleByRows(rows int, sampleExprs, groupExprs []*plan.Expr) *Argument

func (*Argument) AppendChild

func (arg *Argument) AppendChild(child vm.Operator)

func (*Argument) Call

func (arg *Argument) Call(proc *process.Process) (vm.CallResult, error)

func (*Argument) ConvertToPipelineOperator

func (arg *Argument) ConvertToPipelineOperator(in *pipeline.Instruction)

func (*Argument) Free

func (arg *Argument) Free(proc *process.Process, pipelineFailed bool, err error)

func (*Argument) IsByPercent

func (arg *Argument) IsByPercent() bool

func (*Argument) IsMergeSampleByRow

func (arg *Argument) IsMergeSampleByRow() bool

func (*Argument) Prepare

func (arg *Argument) Prepare(proc *process.Process) (err error)

func (*Argument) SetInfo

func (arg *Argument) SetInfo(info *vm.OperatorInfo)

func (*Argument) SimpleDup

func (arg *Argument) SimpleDup() *Argument

func (*Argument) String

func (arg *Argument) String(buf *bytes.Buffer)

Jump to

Keyboard shortcuts

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