exprutil

package
v0.10.3-0...-ffc12fb Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommonDataType

func GetCommonDataType(a *PlanRange, b *PlanRange) schemapb.DataType

func IntRangeOverlap

func IntRangeOverlap(range1 *IntRange, range2 *IntRange) bool

func ParseExprFromPlan

func ParseExprFromPlan(plan *planpb.PlanNode) (*planpb.Expr, error)

func ParseKeys

func ParseKeys(expr *planpb.Expr, kType KeyType) []*planpb.GenericValue

func ParseKeysFromExpr

func ParseKeysFromExpr(expr *planpb.Expr, keyType KeyType) ([]*planpb.GenericValue, bool)

func ParsePartitionKeysFromBinaryExpr

func ParsePartitionKeysFromBinaryExpr(expr *planpb.BinaryExpr, keyType KeyType) ([]*planpb.GenericValue, bool)

func ParsePartitionKeysFromTermExpr

func ParsePartitionKeysFromTermExpr(expr *planpb.TermExpr, keyType KeyType) ([]*planpb.GenericValue, bool)

func ParsePartitionKeysFromUnaryExpr

func ParsePartitionKeysFromUnaryExpr(expr *planpb.UnaryExpr, keyType KeyType) ([]*planpb.GenericValue, bool)

func ParsePartitionKeysFromUnaryRangeExpr

func ParsePartitionKeysFromUnaryRangeExpr(expr *planpb.UnaryRangeExpr, keyType KeyType) ([]*planpb.GenericValue, bool)

func StrRangeOverlap

func StrRangeOverlap(range1 *StrRange, range2 *StrRange) bool

func ValidatePartitionKeyIsolation

func ValidatePartitionKeyIsolation(expr *planpb.Expr) error

Types

type IntRange

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

func NewIntRange

func NewIntRange(l int64, r int64, includeL bool, includeR bool) *IntRange

type KeyType

type KeyType int64
const (
	PartitionKey  KeyType = iota
	ClusteringKey KeyType = PartitionKey + 1
)

type PlanRange

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

func Intersect

func Intersect(a *PlanRange, b *PlanRange) *PlanRange

func ParseRanges

func ParseRanges(expr *planpb.Expr, kType KeyType) ([]*PlanRange, bool)

func ParseRangesFromBinaryExpr

func ParseRangesFromBinaryExpr(expr *planpb.BinaryExpr, kType KeyType) ([]*PlanRange, bool)

func ParseRangesFromTermExpr

func ParseRangesFromTermExpr(expr *planpb.TermExpr, kType KeyType) ([]*PlanRange, bool)

func ParseRangesFromUnaryRangeExpr

func ParseRangesFromUnaryRangeExpr(expr *planpb.UnaryRangeExpr, kType KeyType) ([]*PlanRange, bool)

func (*PlanRange) ToIntRange

func (planRange *PlanRange) ToIntRange() *IntRange

func (*PlanRange) ToStrRange

func (planRange *PlanRange) ToStrRange() *StrRange

type StrRange

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

func NewStrRange

func NewStrRange(l string, r string, includeL bool, includeR bool) *StrRange

Jump to

Keyboard shortcuts

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