exec

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation ¶

Index ¶

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

func ConnectPushExecutors ¶

func ConnectPushExecutors(childExecutors []PushExecutor, parent PushExecutor)

Types ¶

type AggregateFunctionInfo ¶

type AggregateFunctionInfo struct {
	FuncType   aggfuncs.AggFunctionType
	Distinct   bool
	ArgExpr    *common.Expression
	ReturnType common.ColumnType
}

type Aggregator ¶

type Aggregator struct {
	PartialAggTableInfo *common.TableInfo
	FullAggTableInfo    *common.TableInfo
	// contains filtered or unexported fields
}

func NewAggregator ¶

func NewAggregator(pkCols []int, aggFunctions []*AggregateFunctionInfo, partialAggTableInfo *common.TableInfo,
	fullAggTableInfo *common.TableInfo, groupByCols []int, storage cluster.Cluster, sharder *sharder.Sharder) (*Aggregator, error)

func (*Aggregator) AddChild ¶

func (p *Aggregator) AddChild(child PushExecutor)

func (*Aggregator) ClearChildren ¶

func (p *Aggregator) ClearChildren()

func (*Aggregator) ColNames ¶

func (p *Aggregator) ColNames() []string

func (*Aggregator) ColTypes ¶

func (p *Aggregator) ColTypes() []common.ColumnType

func (*Aggregator) ColsVisible ¶

func (p *Aggregator) ColsVisible() []bool

func (*Aggregator) GetChildren ¶

func (p *Aggregator) GetChildren() []PushExecutor

func (*Aggregator) GetParent ¶

func (p *Aggregator) GetParent() PushExecutor

func (*Aggregator) HandleRemoteRows ¶

func (a *Aggregator) HandleRemoteRows(rowsBatch RowsBatch, ctx *ExecutionContext) error

HandleRemoteRows is called when partial aggregation is forwarded from another shard

func (*Aggregator) HandleRows ¶

func (a *Aggregator) HandleRows(rowsBatch RowsBatch, ctx *ExecutionContext) error

func (*Aggregator) KeyCols ¶

func (p *Aggregator) KeyCols() []int

func (*Aggregator) ReCalcSchemaFromChildren ¶

func (a *Aggregator) ReCalcSchemaFromChildren() error

func (*Aggregator) SetColNames ¶

func (p *Aggregator) SetColNames(colNames []string)

func (*Aggregator) SetParent ¶

func (p *Aggregator) SetParent(parent PushExecutor)

type ExecutionContext ¶

type ExecutionContext struct {
	WriteBatch               *cluster.WriteBatch
	RemoteBatches            map[uint64]*cluster.WriteBatch
	BatchSequence            uint32
	EnableDuplicateDetection bool
}

func NewExecutionContext ¶

func NewExecutionContext(writeBatch *cluster.WriteBatch, enableDuplicateDetection bool) *ExecutionContext

func (*ExecutionContext) AddToForwardBatch ¶

func (e *ExecutionContext) AddToForwardBatch(shardID uint64, key []byte, value []byte)

type IndexExecutor ¶

type IndexExecutor struct {
	IndexInfo *common.IndexInfo
	TableInfo *common.TableInfo // The table info of the table (source or MV) that we are creating the index on
	// contains filtered or unexported fields
}

IndexExecutor maintains a secondary index

func NewIndexExecutor ¶

func NewIndexExecutor(tableInfo *common.TableInfo, indexInfo *common.IndexInfo, store cluster.Cluster) *IndexExecutor

func (*IndexExecutor) AddChild ¶

func (p *IndexExecutor) AddChild(child PushExecutor)

func (*IndexExecutor) ClearChildren ¶

func (p *IndexExecutor) ClearChildren()

func (*IndexExecutor) ColNames ¶

func (p *IndexExecutor) ColNames() []string

func (*IndexExecutor) ColTypes ¶

func (p *IndexExecutor) ColTypes() []common.ColumnType

func (*IndexExecutor) ColsVisible ¶

func (p *IndexExecutor) ColsVisible() []bool

func (*IndexExecutor) GetChildren ¶

func (p *IndexExecutor) GetChildren() []PushExecutor

func (*IndexExecutor) GetParent ¶

func (p *IndexExecutor) GetParent() PushExecutor

func (*IndexExecutor) HandleRows ¶

func (t *IndexExecutor) HandleRows(rowsBatch RowsBatch, ctx *ExecutionContext) error

func (*IndexExecutor) KeyCols ¶

func (p *IndexExecutor) KeyCols() []int

func (*IndexExecutor) ReCalcSchemaFromChildren ¶

func (t *IndexExecutor) ReCalcSchemaFromChildren() error

func (*IndexExecutor) SetColNames ¶

func (p *IndexExecutor) SetColNames(colNames []string)

func (*IndexExecutor) SetParent ¶

func (p *IndexExecutor) SetParent(parent PushExecutor)

type PushExecutor ¶

type PushExecutor interface {
	HandleRows(rowsBatch RowsBatch, ctx *ExecutionContext) error

	SetParent(parent PushExecutor)
	GetParent() PushExecutor
	AddChild(parent PushExecutor)
	GetChildren() []PushExecutor
	ClearChildren()
	ReCalcSchemaFromChildren() error
	ColNames() []string
	SetColNames(colNames []string)
	ColTypes() []common.ColumnType
	KeyCols() []int
	ColsVisible() []bool
}

type PushProjection ¶

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

func NewPushProjection ¶

func NewPushProjection(projColumns []*common.Expression) *PushProjection

func (*PushProjection) AddChild ¶

func (p *PushProjection) AddChild(child PushExecutor)

func (*PushProjection) ClearChildren ¶

func (p *PushProjection) ClearChildren()

func (*PushProjection) ColNames ¶

func (p *PushProjection) ColNames() []string

func (*PushProjection) ColTypes ¶

func (p *PushProjection) ColTypes() []common.ColumnType

func (*PushProjection) ColsVisible ¶

func (p *PushProjection) ColsVisible() []bool

func (*PushProjection) GetChildren ¶

func (p *PushProjection) GetChildren() []PushExecutor

func (*PushProjection) GetParent ¶

func (p *PushProjection) GetParent() PushExecutor

func (*PushProjection) HandleRows ¶

func (p *PushProjection) HandleRows(rowsBatch RowsBatch, ctx *ExecutionContext) error

func (*PushProjection) KeyCols ¶

func (p *PushProjection) KeyCols() []int

func (*PushProjection) ReCalcSchemaFromChildren ¶

func (p *PushProjection) ReCalcSchemaFromChildren() error

func (*PushProjection) SetColNames ¶

func (p *PushProjection) SetColNames(colNames []string)

func (*PushProjection) SetParent ¶

func (p *PushProjection) SetParent(parent PushExecutor)

type PushSelect ¶

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

func NewPushSelect ¶

func NewPushSelect(predicates []*common.Expression) *PushSelect

func (*PushSelect) AddChild ¶

func (p *PushSelect) AddChild(child PushExecutor)

func (*PushSelect) ClearChildren ¶

func (p *PushSelect) ClearChildren()

func (*PushSelect) ColNames ¶

func (p *PushSelect) ColNames() []string

func (*PushSelect) ColTypes ¶

func (p *PushSelect) ColTypes() []common.ColumnType

func (*PushSelect) ColsVisible ¶

func (p *PushSelect) ColsVisible() []bool

func (*PushSelect) GetChildren ¶

func (p *PushSelect) GetChildren() []PushExecutor

func (*PushSelect) GetParent ¶

func (p *PushSelect) GetParent() PushExecutor

func (*PushSelect) HandleRows ¶

func (p *PushSelect) HandleRows(rowsBatch RowsBatch, ctx *ExecutionContext) error

func (*PushSelect) KeyCols ¶

func (p *PushSelect) KeyCols() []int

func (*PushSelect) ReCalcSchemaFromChildren ¶

func (p *PushSelect) ReCalcSchemaFromChildren() error

func (*PushSelect) SetColNames ¶

func (p *PushSelect) SetColNames(colNames []string)

func (*PushSelect) SetParent ¶

func (p *PushSelect) SetParent(parent PushExecutor)

type RowWithIndexForwarder ¶

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

func (*RowWithIndexForwarder) AddChild ¶

func (p *RowWithIndexForwarder) AddChild(child PushExecutor)

func (*RowWithIndexForwarder) ClearChildren ¶

func (p *RowWithIndexForwarder) ClearChildren()

func (*RowWithIndexForwarder) ColNames ¶

func (p *RowWithIndexForwarder) ColNames() []string

func (*RowWithIndexForwarder) ColTypes ¶

func (p *RowWithIndexForwarder) ColTypes() []common.ColumnType

func (*RowWithIndexForwarder) ColsVisible ¶

func (p *RowWithIndexForwarder) ColsVisible() []bool

func (*RowWithIndexForwarder) GetChildren ¶

func (p *RowWithIndexForwarder) GetChildren() []PushExecutor

func (*RowWithIndexForwarder) GetParent ¶

func (p *RowWithIndexForwarder) GetParent() PushExecutor

func (*RowWithIndexForwarder) HandleRows ¶

func (r *RowWithIndexForwarder) HandleRows(rowsBatch RowsBatch, ctx *ExecutionContext) error

func (*RowWithIndexForwarder) KeyCols ¶

func (p *RowWithIndexForwarder) KeyCols() []int

func (*RowWithIndexForwarder) ReCalcSchemaFromChildren ¶

func (p *RowWithIndexForwarder) ReCalcSchemaFromChildren() error

func (*RowWithIndexForwarder) SetColNames ¶

func (p *RowWithIndexForwarder) SetColNames(colNames []string)

func (*RowWithIndexForwarder) SetParent ¶

func (p *RowWithIndexForwarder) SetParent(parent PushExecutor)

type RowsBatch ¶

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

func NewCurrentRowsBatch ¶

func NewCurrentRowsBatch(currentRows *common.Rows) RowsBatch

func NewRowsBatch ¶

func NewRowsBatch(rows *common.Rows, entries []RowsEntry) RowsBatch

func (*RowsBatch) AppendEntry ¶

func (r *RowsBatch) AppendEntry(rowPrev *common.Row, rowCurr *common.Row)

func (*RowsBatch) CurrentRow ¶

func (r *RowsBatch) CurrentRow(index int) *common.Row

func (*RowsBatch) Len ¶

func (r *RowsBatch) Len() int

func (*RowsBatch) PreviousRow ¶

func (r *RowsBatch) PreviousRow(index int) *common.Row

func (*RowsBatch) Rows ¶

func (r *RowsBatch) Rows() *common.Rows

func (*RowsBatch) String ¶

func (r *RowsBatch) String() string

type RowsEntry ¶

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

func NewRowsEntry ¶

func NewRowsEntry(prevIndex int, currIndex int) RowsEntry

type Scan ¶

type Scan struct {
	TableName string
	// contains filtered or unexported fields
}

func NewScan ¶

func NewScan(tableName string, cols []int) (*Scan, error)

func (*Scan) AddChild ¶

func (p *Scan) AddChild(child PushExecutor)

func (*Scan) ClearChildren ¶

func (p *Scan) ClearChildren()

func (*Scan) ColNames ¶

func (p *Scan) ColNames() []string

func (*Scan) ColTypes ¶

func (p *Scan) ColTypes() []common.ColumnType

func (*Scan) ColsVisible ¶

func (p *Scan) ColsVisible() []bool

func (*Scan) GetChildren ¶

func (p *Scan) GetChildren() []PushExecutor

func (*Scan) GetParent ¶

func (p *Scan) GetParent() PushExecutor

func (*Scan) HandleRows ¶

func (t *Scan) HandleRows(rowsBatch RowsBatch, ctx *ExecutionContext) error

func (*Scan) KeyCols ¶

func (p *Scan) KeyCols() []int

func (*Scan) ReCalcSchemaFromChildren ¶

func (t *Scan) ReCalcSchemaFromChildren() error

func (*Scan) SetColNames ¶

func (p *Scan) SetColNames(colNames []string)

func (*Scan) SetParent ¶

func (p *Scan) SetParent(parent PushExecutor)

func (*Scan) SetSchema ¶

func (t *Scan) SetSchema(tableInfo *common.TableInfo)

type TableExecutor ¶

type TableExecutor struct {
	TableInfo *common.TableInfo
	// contains filtered or unexported fields
}

TableExecutor updates the changes into the associated table - used to persist state of a materialized view or source

func NewTableExecutor ¶

func NewTableExecutor(tableInfo *common.TableInfo, store cluster.Cluster) *TableExecutor

func (*TableExecutor) AddChild ¶

func (p *TableExecutor) AddChild(child PushExecutor)

func (*TableExecutor) AddConsumingNode ¶

func (t *TableExecutor) AddConsumingNode(consumerName string, node PushExecutor)

func (*TableExecutor) ClearChildren ¶

func (p *TableExecutor) ClearChildren()

func (*TableExecutor) ColNames ¶

func (p *TableExecutor) ColNames() []string

func (*TableExecutor) ColTypes ¶

func (p *TableExecutor) ColTypes() []common.ColumnType

func (*TableExecutor) ColsVisible ¶

func (p *TableExecutor) ColsVisible() []bool

func (*TableExecutor) FillTo ¶

func (t *TableExecutor) FillTo(pe PushExecutor, consumerName string, newTableID uint64,
	schedulers map[uint64]*sched.ShardScheduler, failInject failinject.Injector) error

FillTo - fills the specified PushExecutor with all the rows in the table and also captures any new changes that might arrive while the fill is in progress. Once the fill is complete and the table executor and the push executor are in sync then the operation completes

func (*TableExecutor) ForwardToConsumingNodes ¶

func (t *TableExecutor) ForwardToConsumingNodes(rowsBatch RowsBatch, ctx *ExecutionContext) error

func (*TableExecutor) GetChildren ¶

func (p *TableExecutor) GetChildren() []PushExecutor

func (*TableExecutor) GetConsumingMvNames ¶

func (t *TableExecutor) GetConsumingMvNames() []string

func (*TableExecutor) GetParent ¶

func (p *TableExecutor) GetParent() PushExecutor

func (*TableExecutor) HandleRemoteRows ¶

func (t *TableExecutor) HandleRemoteRows(rowsBatch RowsBatch, ctx *ExecutionContext) error

func (*TableExecutor) HandleRows ¶

func (t *TableExecutor) HandleRows(rowsBatch RowsBatch, ctx *ExecutionContext) error

func (*TableExecutor) KeyCols ¶

func (p *TableExecutor) KeyCols() []int

func (*TableExecutor) ReCalcSchemaFromChildren ¶

func (t *TableExecutor) ReCalcSchemaFromChildren() error

func (*TableExecutor) RemoveConsumingNode ¶

func (t *TableExecutor) RemoveConsumingNode(consumerName string)

func (*TableExecutor) RowsFactory ¶

func (t *TableExecutor) RowsFactory() *common.RowsFactory

func (*TableExecutor) SetColNames ¶

func (p *TableExecutor) SetColNames(colNames []string)

func (*TableExecutor) SetParent ¶

func (p *TableExecutor) SetParent(parent PushExecutor)

type UnionAll ¶

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

func NewUnionAll ¶

func NewUnionAll() (*UnionAll, error)

func (*UnionAll) AddChild ¶

func (p *UnionAll) AddChild(child PushExecutor)

func (*UnionAll) ClearChildren ¶

func (p *UnionAll) ClearChildren()

func (*UnionAll) ColNames ¶

func (p *UnionAll) ColNames() []string

func (*UnionAll) ColTypes ¶

func (p *UnionAll) ColTypes() []common.ColumnType

func (*UnionAll) ColsVisible ¶

func (p *UnionAll) ColsVisible() []bool

func (*UnionAll) GetChildren ¶

func (p *UnionAll) GetChildren() []PushExecutor

func (*UnionAll) GetParent ¶

func (p *UnionAll) GetParent() PushExecutor

func (*UnionAll) HandleRows ¶

func (u *UnionAll) HandleRows(rowsBatch RowsBatch, ctx *ExecutionContext) error

func (*UnionAll) HandleRowsWithIndex ¶

func (u *UnionAll) HandleRowsWithIndex(index int, rowsBatch RowsBatch, ctx *ExecutionContext) error

func (*UnionAll) KeyCols ¶

func (p *UnionAll) KeyCols() []int

func (*UnionAll) ReCalcSchemaFromChildren ¶

func (u *UnionAll) ReCalcSchemaFromChildren() error

func (*UnionAll) SetColNames ¶

func (p *UnionAll) SetColNames(colNames []string)

func (*UnionAll) SetParent ¶

func (p *UnionAll) SetParent(parent PushExecutor)

Jump to

Keyboard shortcuts

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