copr

package
v1.1.0-beta.0...-d5b6b69 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CopContext

type CopContext interface {
	GetBase() *CopContextBase
	IndexColumnOutputOffsets(idxID int64) []int
	IndexInfo(idxID int64) *model.IndexInfo
}

CopContext contains the information that is needed when building a coprocessor request. It is unchanged after initialization.

func NewCopContext

func NewCopContext(
	exprCtx exprctx.BuildContext,
	distSQLCtx *distsqlctx.DistSQLContext,
	pushDownFlags uint64,
	tblInfo *model.TableInfo,
	allIdxInfo []*model.IndexInfo,
	requestSource string,
) (CopContext, error)

NewCopContext creates a CopContext.

type CopContextBase

type CopContextBase struct {
	TableInfo      *model.TableInfo
	PrimaryKeyInfo *model.IndexInfo
	ExprCtx        exprctx.BuildContext
	DistSQLCtx     *distsqlctx.DistSQLContext
	PushDownFlags  uint64
	RequestSource  string

	ColumnInfos []*model.ColumnInfo
	FieldTypes  []*types.FieldType

	ExprColumnInfos             []*expression.Column
	HandleOutputOffsets         []int
	VirtualColumnsOutputOffsets []int
	VirtualColumnsFieldTypes    []*types.FieldType
}

CopContextBase contains common fields for CopContextSingleIndex and CopContextMultiIndex.

func NewCopContextBase

func NewCopContextBase(
	exprCtx exprctx.BuildContext,
	distSQLCtx *distsqlctx.DistSQLContext,
	pushDownFlags uint64,
	tblInfo *model.TableInfo,
	idxCols []*model.IndexColumn,
	requestSource string,
) (*CopContextBase, error)

NewCopContextBase creates a CopContextBase.

type CopContextMultiIndex

type CopContextMultiIndex struct {
	*CopContextBase
	// contains filtered or unexported fields
}

CopContextMultiIndex is the coprocessor context for multiple indexes.

func NewCopContextMultiIndex

func NewCopContextMultiIndex(
	exprCtx exprctx.BuildContext,
	distSQLCtx *distsqlctx.DistSQLContext,
	pushDownFlags uint64,
	tblInfo *model.TableInfo,
	allIdxInfo []*model.IndexInfo,
	requestSource string,
) (*CopContextMultiIndex, error)

NewCopContextMultiIndex creates a CopContextMultiIndex.

func (*CopContextMultiIndex) GetBase

func (c *CopContextMultiIndex) GetBase() *CopContextBase

GetBase implements the CopContext interface.

func (*CopContextMultiIndex) IndexColumnOutputOffsets

func (c *CopContextMultiIndex) IndexColumnOutputOffsets(indexID int64) []int

IndexColumnOutputOffsets implements the CopContext interface.

func (*CopContextMultiIndex) IndexInfo

func (c *CopContextMultiIndex) IndexInfo(indexID int64) *model.IndexInfo

IndexInfo implements the CopContext interface.

type CopContextSingleIndex

type CopContextSingleIndex struct {
	*CopContextBase
	// contains filtered or unexported fields
}

CopContextSingleIndex is the coprocessor context for single index.

func NewCopContextSingleIndex

func NewCopContextSingleIndex(
	exprCtx exprctx.BuildContext,
	distSQLCtx *distsqlctx.DistSQLContext,
	pushDownFlags uint64,
	tblInfo *model.TableInfo,
	idxInfo *model.IndexInfo,
	requestSource string,
) (*CopContextSingleIndex, error)

NewCopContextSingleIndex creates a CopContextSingleIndex.

func (*CopContextSingleIndex) GetBase

func (c *CopContextSingleIndex) GetBase() *CopContextBase

GetBase implements the CopContext interface.

func (*CopContextSingleIndex) IndexColumnOutputOffsets

func (c *CopContextSingleIndex) IndexColumnOutputOffsets(_ int64) []int

IndexColumnOutputOffsets implements the CopContext interface.

func (*CopContextSingleIndex) IndexInfo

func (c *CopContextSingleIndex) IndexInfo(_ int64) *model.IndexInfo

IndexInfo implements the CopContext interface.

Jump to

Keyboard shortcuts

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