datablocks

package
v0.0.0-...-e6fb8a6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 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 ColumnIndex

type ColumnIndex struct {

	// 列名
	Name string

	// 列顺序下表
	Index int
}

type DataBlock

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

DataBlock 表示一个数据块,一个数据块中可能会有多个值,一个值认为是一行数据,合起来称之为一个块

func BuildOneBlockFromExpressions

func BuildOneBlockFromExpressions(exprs []expressions.IExpression) (*DataBlock, error)

func NewDataBlock

func NewDataBlock(cols []*columns.Column) *DataBlock

func (*DataBlock) AggregateSelectionByPlan

func (block *DataBlock) AggregateSelectionByPlan(fields []string, plan *planners.SelectionPlan) ([]expressions.IExpression, error)

AggregateSelectionByPlan 聚合,杂聚?

func (*DataBlock) Append

func (block *DataBlock) Append(blocks ...*DataBlock) error

func (*DataBlock) Clone

func (block *DataBlock) Clone() *DataBlock

func (*DataBlock) Close

func (block *DataBlock) Close()

func (*DataBlock) Column

func (block *DataBlock) Column(name string) (*columns.Column, error)

func (*DataBlock) ColumnIterator

func (block *DataBlock) ColumnIterator(name string) (*DataBlockColumnIterator, error)

func (*DataBlock) ColumnIterators

func (block *DataBlock) ColumnIterators() []*DataBlockColumnIterator

func (*DataBlock) Columns

func (block *DataBlock) Columns() []*columns.Column

func (*DataBlock) DataBlockValue

func (block *DataBlock) DataBlockValue(name string) (*DataBlockValue, error)

func (*DataBlock) DeepClone

func (block *DataBlock) DeepClone() *DataBlock

func (*DataBlock) Dump

func (block *DataBlock) Dump()

func (*DataBlock) FilterByPlan

func (block *DataBlock) FilterByPlan(fields []string, plan *planners.FilterPlan) error

func (*DataBlock) GroupBySelectionByPlan

func (block *DataBlock) GroupBySelectionByPlan(plan *planners.SelectionPlan) (*collections.HashMap, error)

func (*DataBlock) Info

func (block *DataBlock) Info() *DataBlockInfo

func (*DataBlock) Limit

func (block *DataBlock) Limit(offset, limit int) (cutOffset, cutLimit int)

func (*DataBlock) MixsIterator

func (block *DataBlock) MixsIterator(columns []string) (*DataBlockMixsIterator, error)

func (*DataBlock) NormalSelectionByPlan

func (block *DataBlock) NormalSelectionByPlan(fields []string, plan *planners.SelectionPlan) (*DataBlock, error)

func (*DataBlock) NumColumns

func (block *DataBlock) NumColumns() int

func (*DataBlock) NumRows

func (block *DataBlock) NumRows() int

func (*DataBlock) OrderByPlan

func (block *DataBlock) OrderByPlan(fields []string, plan *planners.OrderByPlan) error

OrderByPlan 对数据块中的值排序,拍完序会根据limit把多余的值丢弃掉

func (*DataBlock) ProjectionByPlan

func (block *DataBlock) ProjectionByPlan(plan *planners.MapPlan) (*DataBlock, error)

ProjectionByPlan 根据投影执行计划裁剪列

func (*DataBlock) RowIterator

func (block *DataBlock) RowIterator() *DataBlockRowIterator

func (*DataBlock) SetToLast

func (block *DataBlock) SetToLast()

func (*DataBlock) Split

func (block *DataBlock) Split(chunksize int) ([]*DataBlock, error)

func (*DataBlock) TotalBytes

func (block *DataBlock) TotalBytes() uint64

func (*DataBlock) WriteRow

func (block *DataBlock) WriteRow(values []datavalues.IDataValue) error

type DataBlockColumnIterator

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

func (*DataBlockColumnIterator) Column

func (it *DataBlockColumnIterator) Column() *columns.Column

func (*DataBlockColumnIterator) Next

func (it *DataBlockColumnIterator) Next() bool

func (*DataBlockColumnIterator) Value

type DataBlockInfo

type DataBlockInfo struct {
	Num1        uint64
	IsOverflows bool
	Num2        uint64
	BucketNum   int32
	Num3        uint64
}

DataBlockInfo 数据库块的元信息描述

func (*DataBlockInfo) Read

func (info *DataBlockInfo) Read(reader *binary.Reader) error

func (*DataBlockInfo) Write

func (info *DataBlockInfo) Write(writer *binary.Writer) error

type DataBlockMixsIterator

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

func (*DataBlockMixsIterator) Column

func (it *DataBlockMixsIterator) Column(idx int) *columns.Column

func (*DataBlockMixsIterator) Last

func (*DataBlockMixsIterator) Next

func (it *DataBlockMixsIterator) Next() bool

func (*DataBlockMixsIterator) Value

type DataBlockRowIterator

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

func (*DataBlockRowIterator) Column

func (it *DataBlockRowIterator) Column(idx int) *columns.Column

func (*DataBlockRowIterator) Last

func (*DataBlockRowIterator) Next

func (it *DataBlockRowIterator) Next() bool

func (*DataBlockRowIterator) Value

type DataBlockValue

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

DataBlockValue 用于表示数据块中的一个值

func NewDataBlockValue

func NewDataBlockValue(col *columns.Column) *DataBlockValue

func (*DataBlockValue) ColumnName

func (v *DataBlockValue) ColumnName() string

func (*DataBlockValue) DeepClone

func (v *DataBlockValue) DeepClone() *DataBlockValue

Jump to

Keyboard shortcuts

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