opcode

package
v0.15.9 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PulloutValue = PulloutOpcode(iota)
	PulloutIn
	PulloutNotIn
	PulloutExists
	PulloutNotExists
)

This is the list of PulloutOpcode values.

View Source
const (
	AggregateUnassigned = AggregateOpcode(iota)
	AggregateCount
	AggregateSum
	AggregateMin
	AggregateMax
	AggregateCountDistinct
	AggregateSumDistinct
	AggregateGtid
	AggregateAnyValue
	AggregateCountStar
	AggregateGroupConcat
	AggregateAvg
	AggregateUDF // This is an opcode used to represent UDFs

)

These constants list the possible aggregate opcodes.

Variables

View Source
var AggregateName = map[AggregateOpcode]string{
	AggregateCount:         "count",
	AggregateSum:           "sum",
	AggregateMin:           "min",
	AggregateMax:           "max",
	AggregateCountDistinct: "count_distinct",
	AggregateSumDistinct:   "sum_distinct",
	AggregateGtid:          "vgtid",
	AggregateCountStar:     "count_star",
	AggregateGroupConcat:   "group_concat",
	AggregateAnyValue:      "any_value",
	AggregateAvg:           "avg",
}
View Source
var SupportedAggregates = map[string]AggregateOpcode{
	"count": AggregateCount,
	"sum":   AggregateSum,
	"min":   AggregateMin,
	"max":   AggregateMax,
	"avg":   AggregateAvg,

	"count_distinct": AggregateCountDistinct,
	"sum_distinct":   AggregateSumDistinct,
	"vgtid":          AggregateGtid,
	"count_star":     AggregateCountStar,
	"any_value":      AggregateAnyValue,
	"group_concat":   AggregateGroupConcat,
}

SupportedAggregates maps the list of supported aggregate functions to their opcodes.

Functions

This section is empty.

Types

type AggregateOpcode

type AggregateOpcode int

AggregateOpcode is the aggregation Opcode.

func (AggregateOpcode) IsDistinct

func (code AggregateOpcode) IsDistinct() bool

func (AggregateOpcode) MarshalJSON

func (code AggregateOpcode) MarshalJSON() ([]byte, error)

MarshalJSON serializes the AggregateOpcode as a JSON string. It's used for testing and diagnostics.

func (AggregateOpcode) NeedsComparableValues

func (code AggregateOpcode) NeedsComparableValues() bool

func (AggregateOpcode) Nullable

func (code AggregateOpcode) Nullable() bool

func (AggregateOpcode) ResolveType

func (AggregateOpcode) SQLType

func (code AggregateOpcode) SQLType(typ querypb.Type) querypb.Type

Type returns the opcode return sql type, and a bool telling is we are sure about this type or not

func (AggregateOpcode) String

func (code AggregateOpcode) String() string

type PulloutOpcode

type PulloutOpcode int

PulloutOpcode is a number representing the opcode for the PulloutSubquery primitive.

func (PulloutOpcode) MarshalJSON

func (code PulloutOpcode) MarshalJSON() ([]byte, error)

MarshalJSON serializes the PulloutOpcode as a JSON string. It's used for testing and diagnostics.

func (PulloutOpcode) NeedsListArg

func (code PulloutOpcode) NeedsListArg() bool

func (PulloutOpcode) String

func (code PulloutOpcode) String() string

Jump to

Keyboard shortcuts

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