Documentation
¶
Overview ¶
Package compute provides core computation functionality
Index ¶
- Constants
- Variables
- func AddInPlace(input *chunk.Vector, right int64, cnt int)
- func And(left, right, result *chunk.Vector, count int)
- func AnyTies(ties []bool, count int) bool
- func BSWAP16(x uint16) uint16
- func BSWAP32(x uint32) uint32
- func BSWAP64(x uint64) uint64
- func ColumnDataCopySwitch(metaData *ColumnDataMetaData, srcData *chunk.UnifiedFormat, src *chunk.Vector, ...)
- func Combine[ResultT any, STATE State[ResultT], InputT any, OP AggrOp[ResultT, InputT]](source *chunk.Vector, target *chunk.Vector, data *AggrInputData, count int, ...)
- func CompareVal(lPtr, rPtr unsafe.Pointer, typ common.LType) int
- func ComputeStringEntrySizes(col *chunk.UnifiedFormat, entrySizes []int, sel *chunk.SelectVector, count int, ...)
- func ComputeTies(dataPtr unsafe.Pointer, count int, colOffset int, tieSize int, ties []bool, ...)
- func EncodeStringDataPrefix(dataPtr unsafe.Pointer, value *common.String, prefixLen int)
- func EntriesPerBlock(width int) int
- func ExplainLogicalPlan(root *LogicalOperator) (string, error)
- func ExplainPhysicalPlan(root *PhysicalOperator) (string, error)
- func FillSwitch(vec *chunk.Vector, res *chunk.Vector, sel *chunk.SelectVector, count int)
- func Finalize[ResultT any, STATE State[ResultT], InputT any, OP AggrOp[ResultT, InputT]](states *chunk.Vector, data *AggrInputData, result *chunk.Vector, count int, ...)
- func FinalizeStates(layout *TupleDataLayout, addresses *chunk.Vector, result *chunk.Chunk, ...)
- func FindSubgraphMatchAndMerge(mergeTo *Subgraph2Denominator, findMe uint64, next int, ...)
- func FlipSign(b uint8) uint8
- func Gather(rows *chunk.Vector, rowSel *chunk.SelectVector, col *chunk.Vector, ...)
- func GatherVarchar(rows *chunk.Vector, rowSel *chunk.SelectVector, col *chunk.Vector, ...)
- func GetDistinctIndices(aggregates []*Expr) []int
- func GetTmp(src unsafe.Pointer, constants *PDQConstants) unsafe.Pointer
- func InitStates(layout *TupleDataLayout, addresses *chunk.Vector, sel *chunk.SelectVector, ...)
- func InsertHashesLoop(pointers []unsafe.Pointer, indices []uint64, cnt int, keyLocs []unsafe.Pointer, ...)
- func InsertionSort(origPtr unsafe.Pointer, tempPtr unsafe.Pointer, count int, colOffset int, ...)
- func IsAgg(name string) bool
- func IsLogicalFilter(op *LogicalOperator) bool
- func IsOperator(name string) bool
- func Match(columns *chunk.Chunk, colData []*chunk.UnifiedFormat, layout *TupleDataLayout, ...) int
- func Move(dst, src unsafe.Pointer, constants *PDQConstants)
- func NoCast(src *chunk.Vector, res *chunk.Vector, count int, params *CastParams) bool
- func RadixScatter(v *chunk.Vector, vcount int, sel *chunk.SelectVector, serCount int, ...)
- func RadixScatterStringVector(vdata *chunk.UnifiedFormat, sel *chunk.SelectVector, addCount int, ...)
- func RadixSort(dataPtr unsafe.Pointer, count int, colOffset int, sortingSize int, ...)
- func RadixSortLSD(dataPtr unsafe.Pointer, count int, colOffset int, rowWidth int, ...)
- func RadixSortMSD(origPtr unsafe.Pointer, tempPtr unsafe.Pointer, count int, colOffset int, ...)
- func RegisterAggrs()
- func RegisterOps()
- func Run(cfg *util.Config) error
- func RunDDL(cfg *util.Config) error
- func ScalarNopFunc(input *chunk.Chunk, state *ExprState, result *chunk.Vector)
- func Scatter(columns *chunk.Chunk, colData []*chunk.UnifiedFormat, layout *RowLayout, ...)
- func ScatterStringVector(col *chunk.UnifiedFormat, rows *chunk.Vector, strLocs []unsafe.Pointer, ...)
- func SortTiedBlobs(sb *SortedBlock, ties []bool, dataPtr unsafe.Pointer, count int, tieCol int, ...)
- func SortTiedBlobs2(dataPtr unsafe.Pointer, start int, end int, tieCol int, ties []bool, ...)
- func StateSize[T any, STATE State[T]]() int
- func SubSortTiedTuples(dataPtr unsafe.Pointer, count int, colOffset int, sortingSize int, ties []bool, ...)
- func SwapOffsetsGetTmp(src unsafe.Pointer, constants *PDQConstants) unsafe.Pointer
- func TemplatedColumnDataCopy[T any](metaData *ColumnDataMetaData, srcData *chunk.UnifiedFormat, src *chunk.Vector, ...)
- func TemplatedCompareVal[T any](lPtr, rPtr unsafe.Pointer, equalOp BinaryOp[T, T, bool], ...) int
- func TemplatedFillLoop[T any](vec *chunk.Vector, res *chunk.Vector, sel *chunk.SelectVector, count int)
- func TemplatedGatherLoop[T any](rows *chunk.Vector, rowSel *chunk.SelectVector, col *chunk.Vector, ...)
- func TemplatedMatch(columns *chunk.Chunk, colData []*chunk.UnifiedFormat, layout *TupleDataLayout, ...)
- func TemplatedMatchOp(vec *chunk.Vector, col *chunk.UnifiedFormat, predTyp string, ...)
- func TemplatedMatchType[T any](col *chunk.UnifiedFormat, rows *chunk.Vector, rowWidth int, ...)
- func TemplatedRadixScatter[T any](vdata *chunk.UnifiedFormat, sel *chunk.SelectVector, addCount int, ...)
- func TemplatedScatter[T any](col *chunk.UnifiedFormat, rows *chunk.Vector, sel *chunk.SelectVector, ...)
- func TemplatedTryCastLoop[T any, R any](src, res *chunk.Vector, count int, params *CastParams, op UnaryOp2[T, R]) bool
- func TieIsBreakable(tieCol int, rowPtr unsafe.Pointer, layout *SortLayout) bool
- func TryCastLoop[T any, R any](src, res *chunk.Vector, count int, params *CastParams, op CastOp[T, R]) bool
- func TupleDataTemplatedGather[T any](layout *TupleDataLayout, rowLocs *chunk.Vector, colIdx int, ...)
- func TupleDataTemplatedGatherSwitch(layout *TupleDataLayout, rowLocs *chunk.Vector, colIdx int, ...)
- func TupleDataTemplatedScatter[T any](srcFormat *chunk.UnifiedFormat, appendSel *chunk.SelectVector, cnt int, ...)
- func TupleDataTemplatedScatterSwitch(src *chunk.Vector, srcFormat *chunk.UnifiedFormat, ...)
- func TupleDataValueStore[T any](src T, rowLoc unsafe.Pointer, offsetInRow int, heapLoc *unsafe.Pointer, ...)
- func UnaryExecuteStandard[T any, R any](input, result *chunk.Vector, count int, data *UnaryData, addNulls bool)
- func UnaryFlatLoop[ResultT any, STATE State[ResultT], InputT any, OP AggrOp[ResultT, InputT]](inputSlice []InputT, data *AggrInputData, statesPtrSlice []unsafe.Pointer, ...)
- func UnaryFlatUpdateLoop[ResultT any, STATE State[ResultT], InputT any, OP AggrOp[ResultT, InputT]](inputSlice []InputT, data *AggrInputData, statePtr unsafe.Pointer, count int, ...)
- func UnaryScatter[ResultT any, STATE State[ResultT], InputT any, OP AggrOp[ResultT, InputT]](input *chunk.Vector, states *chunk.Vector, data *AggrInputData, count int, ...)
- func UnaryScatterLoop[ResultT any, STATE State[ResultT], InputT any](inputSlice []InputT, data *AggrInputData, statesPtrSlice []unsafe.Pointer, ...)
- func UnaryUpdate[ResultT any, STATE State[ResultT], InputT any, OP AggrOp[ResultT, InputT]](input *chunk.Vector, data *AggrInputData, statePtr unsafe.Pointer, count int, ...)
- func UnaryUpdateLoop[ResultT any, STATE State[ResultT], InputT any, OP AggrOp[ResultT, InputT]](inputSlice []InputT, data *AggrInputData, statePtr unsafe.Pointer, count int, ...)
- func UpdateDenom(rel2Dem *Subgraph2Denominator, rel2TDom *RelationToTDom)
- func UpdateStates(aggr *AggrObject, addresses *chunk.Vector, payload *chunk.Chunk, argIdx int, ...)
- func VectorTryCastOperator[T, R any](input *T, result *R, mask *util.Bitmap, idx int, data *UnaryData, ...)
- func WildcardMatch(pattern, target *common.String) bool
- func WriteExpr(ctx *FormatCtx, expr *Expr)
- func WriteExprTree(tree treeprint.Tree, expr *Expr)
- func WriteExprs(ctx *FormatCtx, exprs []*Expr)
- func WriteExprsTree(tree treeprint.Tree, exprs []*Expr)
- func WriteMap[K comparable, V any](ctx *FormatCtx, m map[K]V)
- func WriteMapTree[K comparable, V any](tree treeprint.Tree, m map[K]V)
- type AddFunc
- type AddOp
- type AggrFinalizeData
- type AggrHTAppendState
- type AggrInputData
- type AggrObject
- type AggrOp
- type AggrType
- type AggrUnaryInput
- type AndOp
- type AvgFunc
- type AvgOp
- func (AvgOp[ResultT, InputT]) Combine(src *State[ResultT], target *State[ResultT], data *AggrInputData, ...)
- func (AvgOp[ResultT, InputT]) ConstantOperation(s3 *State[ResultT], input *InputT, data *AggrUnaryInput, count int, ...)
- func (AvgOp[ResultT, InputT]) Finalize(s3 *State[ResultT], target *ResultT, data *AggrFinalizeData)
- func (AvgOp[ResultT, InputT]) IgnoreNull() bool
- func (AvgOp[ResultT, InputT]) Init(s2 *State[ResultT], sop StateOp[ResultT])
- func (AvgOp[ResultT, InputT]) Operation(s3 *State[ResultT], input *InputT, data *AggrUnaryInput, sop StateOp[ResultT], ...)
- type AvgStateOp
- type BaseInfo
- type BaseStats
- type BaseValueCopy
- type BinaryFunc
- type BinaryLambdaWrapper
- type BinaryLambdaWrapperWithNulls
- type BinaryOp
- type BinarySingleArgumentOperatorWrapper
- type BinaryStandardOperatorWrapper
- type BinaryWrapper
- type BindCastFunc
- type BindCastFuncType
- type BindCastInfo
- type BindCastInput
- type BindContext
- func (bc *BindContext) AddBinding(alias string, b *Binding) error
- func (bc *BindContext) AddContext(obc *BindContext) error
- func (bc *BindContext) BindColumn(table, column string, depth int) (*Expr, error)
- func (bc *BindContext) Format(ctx *FormatCtx)
- func (bc *BindContext) GetBinding(name string) (*Binding, error)
- func (bc *BindContext) GetCteBinding(name string) *Binding
- func (bc *BindContext) GetMatchingBinding(table, column string) (*Binding, int, error)
- func (bc *BindContext) Print(tree treeprint.Tree)
- func (bc *BindContext) RemoveContext(obList []*Binding)
- type Binding
- type BindingType
- type BlockAppendEntry
- type BoolFunc
- type BooleanOp
- type BoundCastData
- type BoundCastInfo
- func BoolCastToSwitch(input *BindCastInput, src, dst common.LType) *BoundCastInfo
- func DecimalCastToSwitch(input *BindCastInput, src, dst common.LType) *BoundCastInfo
- func DefaultCastFunc(input *BindCastInput, src, dst common.LType) *BoundCastInfo
- func FloatCastToSwitch(input *BindCastInput, src, dst common.LType) *BoundCastInfo
- func HugeintCastToSwitch(input *BindCastInput, src, dst common.LType) *BoundCastInfo
- func IntegerCastToSwitch(input *BindCastInput, src, dst common.LType) *BoundCastInfo
- func NumericCastSwitch(input *BindCastInput, src, dst common.LType) *BoundCastInfo
- func StringCastToSwitch(input *BindCastInput, src, dst common.LType) *BoundCastInfo
- type Builder
- func (b *Builder) CastLogicalOperatorToTypes(targetTyps []common.LType, root *LogicalOperator) (*LogicalOperator, error)
- func (b *Builder) CreatePhyPlan(root *LogicalOperator) (*PhysicalOperator, error)
- func (b *Builder) CreatePlan(ctx *BindContext, root *LogicalOperator) (*LogicalOperator, error)
- func (b *Builder) Format(ctx *FormatCtx)
- func (b *Builder) GetTag() int
- func (b *Builder) Optimize(ctx *BindContext, root *LogicalOperator) (*LogicalOperator, error)
- func (b *Builder) Print(tree treeprint.Tree)
- func (b *Builder) String() string
- type CTEInfo
- type CardinalityEstimator
- func (est *CardinalityEstimator) AddColumnToRelationMap(tableIndex, columnIndex uint64)
- func (est *CardinalityEstimator) AddRelationColumnMapping(get *LogicalOperator, relId uint64) error
- func (est *CardinalityEstimator) AddRelationTdom(filterInfo *FilterInfo)
- func (est *CardinalityEstimator) AddRelationToColumnMapping(key, value ColumnBind)
- func (est *CardinalityEstimator) AddToEquivalenceSets(filterInfo *FilterInfo, set []uint64)
- func (est *CardinalityEstimator) CopyRelationMap(cmap ColumnBindMap)
- func (est *CardinalityEstimator) DetermineMatchingEquivalentSets(filterInfo *FilterInfo) []uint64
- func (est *CardinalityEstimator) EmptyFilter(filterInfo *FilterInfo) bool
- func (est *CardinalityEstimator) EstimateBaseTableCard(node *JoinNode, op *LogicalOperator)
- func (est *CardinalityEstimator) EstimateCardWithSet(newset *JoinRelationSet) float64
- func (est *CardinalityEstimator) EstimateCrossProduct(left, right *JoinNode) float64
- func (est *CardinalityEstimator) GetTableFilters(op *LogicalOperator, tableIndex uint64) *TableFilterSet
- func (est *CardinalityEstimator) InitCardinalityEstimatorProps(nodeOps []*NodeOp, filterInfos []*FilterInfo) error
- func (est *CardinalityEstimator) InitEquivalentRelations(filterInfos []*FilterInfo)
- func (est *CardinalityEstimator) InitTotalDomains()
- func (est *CardinalityEstimator) MergeBindings(bindIdx uint64, relId uint64, cmaps []ColumnBindMap)
- func (est *CardinalityEstimator) SingleColumnFilter(filterInfo *FilterInfo) bool
- func (est *CardinalityEstimator) UpdateTotalDomains(node *JoinNode, op *LogicalOperator) error
- type CaseFunc
- type CastFuncType
- type CastFunctionSet
- type CastOp
- type CastParams
- type Catalog
- type CatalogTable
- type ColumnBind
- type ColumnBindCountMap
- type ColumnBindMap
- type ColumnBindPosMap
- type ColumnBindSet
- type ColumnDataCollection
- func (cdc *ColumnDataCollection) Append(input *chunk.Chunk)
- func (cdc *ColumnDataCollection) Count() int
- func (cdc *ColumnDataCollection) NextScanIndex(state *ColumnDataScanState, chunkIdx *int, rowIdx *int) bool
- func (cdc *ColumnDataCollection) ReadVector(state *ColumnDataScanState, srcVec *chunk.Vector, dstVec *chunk.Vector, ...) int
- func (cdc *ColumnDataCollection) Scan(state *ColumnDataScanState, output *chunk.Chunk) bool
- type ColumnDataMetaData
- type ColumnDataScanState
- type ColumnPrune
- type CompareOp
- type ConstType
- type ConstValue
- func NewBooleanConst(value bool) ConstValue
- func NewDateConst(value string) ConstValue
- func NewDecimalConst(value string) ConstValue
- func NewFloatConst(value float64) ConstValue
- func NewIntegerConst(value int64) ConstValue
- func NewIntervalConst(value int64, unit string) ConstValue
- func NewNullConst() ConstValue
- func NewStringConst(value string) ConstValue
- func (c ConstValue) GetBoolean() (bool, error)
- func (c ConstValue) GetDate() (string, error)
- func (c ConstValue) GetDecimal() (string, error)
- func (c ConstValue) GetFloat() (float64, error)
- func (c ConstValue) GetInteger() (int64, error)
- func (c ConstValue) GetInterval() (int64, string, error)
- func (c ConstValue) GetString() (string, error)
- func (c ConstValue) IsNull() bool
- type CountFunc
- type CountOp
- func (CountOp[ResultT, InputT]) Combine(src *State[ResultT], target *State[ResultT], data *AggrInputData, ...)
- func (CountOp[ResultT, InputT]) ConstantOperation(s3 *State[ResultT], input *InputT, data *AggrUnaryInput, count int, ...)
- func (CountOp[ResultT, InputT]) Finalize(s3 *State[ResultT], target *ResultT, data *AggrFinalizeData)
- func (CountOp[ResultT, InputT]) IgnoreNull() bool
- func (CountOp[ResultT, InputT]) Init(s2 *State[ResultT], sop StateOp[ResultT])
- func (CountOp[ResultT, InputT]) Operation(s3 *State[ResultT], input *InputT, data *AggrUnaryInput, sop StateOp[ResultT], ...)
- type CountStateOp
- type CrossProduct
- type CrossProductExec
- type CrossStage
- type DataType
- type DateAdd
- type DateSub
- type DecimalAdd
- func (*DecimalAdd) AddConstant(*State[common.Decimal], *common.Decimal, int, TypeOp[common.Decimal])
- func (dAdd *DecimalAdd) AddNumber(state *State[common.Decimal], input *common.Decimal, ...)
- func (*DecimalAdd) Assign(s *State[common.Decimal], input *common.Decimal)
- func (*DecimalAdd) Execute(s *State[common.Decimal], input *common.Decimal, top TypeOp[common.Decimal])
- type DevideFunc
- type DistinctAggrCollectionInfo
- type DistinctAggrData
- type Double
- type DoubleAdd
- type DoubleInt32Add
- type ET
- type ET_JoinType
- type ET_SubqueryType
- type Encoder
- type Equal
- type EqualFunc
- type EstimatedProperties
- type ExecStats
- type ExplainBuffer
- type ExplainCtx
- type ExplainOption
- type ExplainOptions
- func (eopt *ExplainOptions) SetBooleanOption(option int, enabled bool)
- func (eopt *ExplainOptions) SetDefaultValues()
- func (eopt *ExplainOptions) SetFormatOption(option int, format int)
- func (eopt *ExplainOptions) SetSerializeOption(option int, serialize int)
- func (eopt *ExplainOptions) String() string
- type ExplainPosition
- type Expr
- type ExprExec
- type ExprExecState
- type ExprState
- type ExtractFunc
- type FilterInfo
- type Format
- type FormatCtx
- func (fc *FormatCtx) AddOffset()
- func (fc *FormatCtx) RestoreOffset()
- func (fc *FormatCtx) String() string
- func (fc *FormatCtx) Write(s string)
- func (fc *FormatCtx) WriteStrings(ss []string)
- func (fc *FormatCtx) Writef(f string, args ...any)
- func (fc *FormatCtx) Writefln(f string, args ...any)
- func (fc *FormatCtx) Writeln(args ...any)
- type FuncNullHandling
- type FuncSideEffects
- type FuncType
- type Function
- func GetAvgAggr(retPhyTyp common.PhyType, inputPhyTyp common.PhyType) *Function
- func GetCountAggr(retPhyTyp common.PhyType, inputPhyTyp common.PhyType) *Function
- func GetMaxAggr(retPhyTyp common.PhyType, inputPhyTyp common.PhyType) *Function
- func GetMinAggr(retPhyTyp common.PhyType, inputPhyTyp common.PhyType) *Function
- func GetSumAggr(pTyp common.PhyType) *Function
- func UnaryAggregate[ResultT any, STATE State[ResultT], InputT any, OP AggrOp[ResultT, InputT]](inputTyp common.LType, retTyp common.LType, nullHandling FuncNullHandling, ...) *Function
- type FunctionBinder
- func (binder *FunctionBinder) BindAggrFunc(name string, args []*Expr, isOperator bool) *Expr
- func (binder *FunctionBinder) BindAggrFunc2(fun *Function, args []*Expr, isOperator bool) *Expr
- func (binder *FunctionBinder) BindFunc(name string, set *FunctionSet, args []common.LType) int
- func (binder *FunctionBinder) BindFunc2(name string, set *FunctionSet, args []*Expr) int
- func (binder *FunctionBinder) BindFuncByArgs(name string, set *FunctionSet, args []common.LType) int
- func (binder *FunctionBinder) BindFuncByArgs2(name string, set *FunctionSet, args []common.LType) []int
- func (binder *FunctionBinder) BindFuncCost(fun *Function, args []common.LType) int64
- func (binder *FunctionBinder) BindScalarFunc(name string, args []*Expr, isOperator bool) *Expr
- func (binder *FunctionBinder) BindScalarFunc2(fun *Function, args []*Expr, isOperator bool) *Expr
- func (binder *FunctionBinder) CastToFuncArgs(fun *Function, args []*Expr)
- type FunctionData
- func BindDecimalAddSubstract(fun *Function, args []*Expr) *FunctionData
- func BindDecimalAvg(fun *Function, args []*Expr) *FunctionData
- func BindDecimalCaseWhen(fun *Function, args []*Expr) *FunctionData
- func BindDecimalDivide(fun *Function, args []*Expr) *FunctionData
- func BindDecimalMinMax(fun *Function, args []*Expr) *FunctionData
- func BindDecimalMultiply(fun *Function, args []*Expr) *FunctionData
- func BindDecimalSum(fun *Function, args []*Expr) *FunctionData
- func DecimalNegateBind(fun *Function, args []*Expr) *FunctionData
- func NopDecimalBind(fun *Function, args []*Expr) *FunctionData
- type FunctionInfo
- type FunctionList
- type FunctionSet
- type GenerateJoinRelation
- type GenericUnaryWrapper
- type Greater
- type GreaterThan
- type GroupedAggrData
- func (gad *GroupedAggrData) GroupCount() int
- func (gad *GroupedAggrData) InitChildrenOutput(outputs []*Expr)
- func (gad *GroupedAggrData) InitDistinct(aggr *Expr, groups []*Expr, rawInputTypes []common.LType)
- func (gad *GroupedAggrData) InitDistinctGroups(groups []*Expr)
- func (gad *GroupedAggrData) InitGroupby(groups []*Expr, exprs []*Expr, groupingFuncs [][]int, ...)
- func (gad *GroupedAggrData) InitGroupbyGroups(groups []*Expr)
- func (gad *GroupedAggrData) SetGroupingFuncs(funcs [][]int)
- type GroupedAggrHashTable
- func (aht *GroupedAggrHashTable) AddChunk(state *AggrHTAppendState, groups *chunk.Chunk, groupHashes *chunk.Vector, ...) int
- func (aht *GroupedAggrHashTable) AddChunk2(state *AggrHTAppendState, groups *chunk.Chunk, payload *chunk.Chunk, ...) int
- func (aht *GroupedAggrHashTable) Count() int
- func (aht *GroupedAggrHashTable) FetchAggregates(groups, result *chunk.Chunk)
- func (aht *GroupedAggrHashTable) Finalize()
- func (aht *GroupedAggrHashTable) FindOrCreateGroups(state *AggrHTAppendState, groups *chunk.Chunk, groupHashes *chunk.Vector, ...) int
- func (aht *GroupedAggrHashTable) Resize(size int)
- func (aht *GroupedAggrHashTable) ResizeThreshold() int
- func (aht *GroupedAggrHashTable) Scan(state *TupleDataScanState, result *chunk.Chunk) int
- func (aht *GroupedAggrHashTable) UpdateBlockPointers()
- func (aht *GroupedAggrHashTable) Verify()
- type GroupingSet
- type HashAggr
- func (haggr *HashAggr) DistinctGrouping(groupingData *HashAggrGroupingData, groupingIdx int)
- func (haggr *HashAggr) FetechAggregates(state *HashAggrScanState, groups, output *chunk.Chunk) OperatorResult
- func (haggr *HashAggr) Finalize()
- func (haggr *HashAggr) FinalizeDistinct()
- func (haggr *HashAggr) FinalizeInternal(checkDistinct bool)
- func (haggr *HashAggr) GetData(state *HashAggrScanState, output, rawInput *chunk.Chunk) OperatorResult
- func (haggr *HashAggr) Sink(data *chunk.Chunk)
- func (haggr *HashAggr) SinkDistinct(chunk, childrenOutput *chunk.Chunk)
- func (haggr *HashAggr) SinkDistinctGrouping(data, childrenOutput *chunk.Chunk, groupingIdx int)
- type HashAggrGroupingData
- type HashAggrScanState
- type HashAggrState
- type HashJoin
- type HashJoinStage
- type HugeintAdd
- func (*HugeintAdd) AddConstant(*State[common.Hugeint], *int32, int, TypeOp[common.Hugeint])
- func (hadd *HugeintAdd) AddNumber(state *State[common.Hugeint], input *int32, top TypeOp[common.Hugeint])
- func (*HugeintAdd) Assign(*State[common.Hugeint], *int32)
- func (*HugeintAdd) Execute(*State[common.Hugeint], *int32, TypeOp[common.Hugeint])
- type HugeintAddInt64
- func (*HugeintAddInt64) AddConstant(*State[common.Hugeint], *int64, int, TypeOp[common.Hugeint])
- func (hadd *HugeintAddInt64) AddNumber(state *State[common.Hugeint], input *int64, top TypeOp[common.Hugeint])
- func (*HugeintAddInt64) Assign(*State[common.Hugeint], *int64)
- func (*HugeintAddInt64) Execute(*State[common.Hugeint], *int64, TypeOp[common.Hugeint])
- type InFunc
- type InWhichClause
- type IntSet
- type JoinHashTable
- func (jht *JoinHashTable) ApplyBitmask(hashes *chunk.Vector, cnt int)
- func (jht *JoinHashTable) ApplyBitmask2(hashes *chunk.Vector, sel *chunk.SelectVector, cnt int, pointers *chunk.Vector)
- func (jht *JoinHashTable) Build(keys *chunk.Chunk, payload *chunk.Chunk)
- func (jht *JoinHashTable) Finalize()
- func (jht *JoinHashTable) InitPointerTable()
- func (jht *JoinHashTable) InsertHashes(hashes *chunk.Vector, cnt int, keyLocs []unsafe.Pointer)
- func (jht *JoinHashTable) Probe(keys *chunk.Chunk) *Scan
- type JoinInfo
- type JoinNode
- type JoinOrderOptimizer
- type JoinRelationSet
- type JoinRelationSetManager
- type LOT
- type LOT_JoinType
- type LTypeCmpResult
- type LessEqualFunc
- type LessFunc
- type LikeFunc
- type Limit
- type LimitReader
- type LimitState
- type LocalSort
- func (ls *LocalSort) ConcatenateBlocks(rowData *RowDataCollection) *RowDataBlock
- func (ls *LocalSort) ReOrder(reorderHeap bool)
- func (ls *LocalSort) ReOrder2(sd *SortedData, sortingPtr unsafe.Pointer, heap *RowDataCollection, ...)
- func (ls *LocalSort) SinkChunk(sort, payload *chunk.Chunk)
- func (ls *LocalSort) Sort(reorderHeap bool)
- func (ls *LocalSort) SortInMemory()
- type LogicalOperator
- type MaxFunc
- type MaxStateOp
- type MinFunc
- type MinMaxOp
- func (MinMaxOp[ResultT, InputT]) Combine(src *State[ResultT], target *State[ResultT], data *AggrInputData, ...)
- func (MinMaxOp[ResultT, InputT]) ConstantOperation(s3 *State[ResultT], input *InputT, data *AggrUnaryInput, count int, ...)
- func (MinMaxOp[ResultT, InputT]) Finalize(s3 *State[ResultT], target *ResultT, data *AggrFinalizeData)
- func (MinMaxOp[ResultT, InputT]) IgnoreNull() bool
- func (MinMaxOp[ResultT, InputT]) Init(s2 *State[ResultT], sop StateOp[ResultT])
- func (MinMaxOp[ResultT, InputT]) Operation(s3 *State[ResultT], input *InputT, data *AggrUnaryInput, sop StateOp[ResultT], ...)
- type MinStateOp
- type MultiplyFunc
- type NodeOp
- type NotEqualFunc
- type NotLikeFunc
- type NumericTryCast
- type OperatorExec
- type OperatorResult
- type OperatorState
- type OperatorType
- type OprAggrState
- type OprBaseState
- type OprFilterState
- type OprInsertState
- type OprJoinState
- type OprLimitState
- type OprProjectState
- type OprScanState
- type OprSortState
- type OprStubState
- type OrderByInfo
- type OrderByNullType
- type OrderType
- type PDQConstants
- type PDQIterator
- type POT
- type Padding
- type PayloadScanner
- type PhysicalOperator
- type QueryGraph
- func (graph *QueryGraph) CreateEdge(left, right *JoinRelationSet, info *FilterInfo)
- func (graph *QueryGraph) GetConnections(node, other *JoinRelationSet) (conns []*neighborInfo)
- func (graph *QueryGraph) GetNeighbors(node *JoinRelationSet, excludeSet UnorderedSet) (ret []uint64)
- func (graph *QueryGraph) String() string
- type RadixPartitionedHashTable
- func (rpht *RadixPartitionedHashTable) FetchAggregates(groups, result *chunk.Chunk)
- func (rpht *RadixPartitionedHashTable) Finalize()
- func (rpht *RadixPartitionedHashTable) GetData(state *TupleDataScanState, output, childrenOutput *chunk.Chunk) OperatorResult
- func (rpht *RadixPartitionedHashTable) SetGroupingValues()
- func (rpht *RadixPartitionedHashTable) Sink(data, payload, childrenOutput *chunk.Chunk, filter []int)
- type ReferredColumnBindMap
- type RelationAttributes
- type RelationToTDom
- type RowDataBlock
- type RowDataCollection
- func (cdc *RowDataCollection) AppendToBlock(block *RowDataBlock, appendEntries *[]BlockAppendEntry, remaining int, ...) int
- func (cdc *RowDataCollection) Build(addedCnt int, keyLocs []unsafe.Pointer, entrySizes []int, ...)
- func (cdc *RowDataCollection) Close()
- func (cdc *RowDataCollection) CreateBlock() *RowDataBlock
- type RowDataCollectionScanner
- type RowLayout
- type Runner
- type ScalarFunc
- func BinaryFunction[T, S, R any](op BinaryOp[T, S, R]) ScalarFunc
- func ExecuteStandard[T, S, R any](op BinaryOp[T, S, R]) ScalarFunc
- func GetScalarBinaryAddFunction(ptyp common.PhyType, checkOverflow bool) ScalarFunc
- func GetScalarBinaryAddFunctionWithOverflowCheck(ptyp common.PhyType) ScalarFunc
- func GetScalarBinaryAddFunctionWithoutOverflowCheck(ptyp common.PhyType) ScalarFunc
- func GetScalarBinaryFunction(ptyp common.PhyType, opKind string, checkOverflow bool) ScalarFunc
- func GetScalarBinaryMulFunction(ptyp common.PhyType, overflow bool) ScalarFunc
- func GetScalarBinaryMulFunctionWithOverflow(ptyp common.PhyType) ScalarFunc
- func GetScalarBinaryMulFunctionWithoutOverflow(ptyp common.PhyType) ScalarFunc
- func GetScalarBinarySubFunction(ptyp common.PhyType, overflow bool) ScalarFunc
- func GetScalarBinarySubFunctionWithOverflow(ptyp common.PhyType) ScalarFunc
- func GetScalarBinarySubFunctionWithoutOverflow(ptyp common.PhyType) ScalarFunc
- func GetScalarIntegerAddFunction(ptyp common.PhyType, checkOverflow bool) ScalarFunc
- func GetScalarIntegerAddFunctionWithOverflowCheck(ptyp common.PhyType) ScalarFunc
- func GetScalarIntegerAddFunctionWithoutOverflowCheck(ptyp common.PhyType) ScalarFunc
- func GetScalarIntegerFunction(ptyp common.PhyType, opKind string, checkOverflow bool) ScalarFunc
- func GetScalarIntegerMulFunction(ptyp common.PhyType, overflow bool) ScalarFunc
- func GetScalarIntegerMulFunctionWithOverflow(ptyp common.PhyType) ScalarFunc
- func GetScalarIntegerMulFunctionWithoutOverflow(ptyp common.PhyType) ScalarFunc
- func GetScalarIntegerSubFunction(ptyp common.PhyType, overflow bool) ScalarFunc
- func GetScalarIntegerSubFunctionWithOverflow(ptyp common.PhyType) ScalarFunc
- func GetScalarIntegerSubFunctionWithoutOverflow(ptyp common.PhyType) ScalarFunc
- func GetScalarUnaryFunction(typ common.LType, opKind string) ScalarFunc
- func GetScalarUnarySubFunction(typ common.LType) ScalarFunc
- func TernaryExecStandard[A any, B any, C any, R any](op TernaryOp[A, B, C, R]) ScalarFunc
- func TernaryFunction[A any, B any, C any, R any](op TernaryOp[A, B, C, R]) ScalarFunc
- func UnaryFunction[T any, R any](op UnaryOp[T, R]) ScalarFunc
- type Scan
- func (scan *Scan) InnerJoin(keys *chunk.Chunk, resVec *chunk.SelectVector) int
- func (scan *Scan) Next(keys, left, result *chunk.Chunk)
- func (scan *Scan) NextAntiJoin(keys, left, result *chunk.Chunk)
- func (scan *Scan) NextInnerJoin(keys, left, result *chunk.Chunk)
- func (scan *Scan) NextLeftJoin(keys, left, result *chunk.Chunk)
- func (scan *Scan) NextMarkJoin(keys, left, result *chunk.Chunk)
- func (scan *Scan) NextSemiJoin(keys, left, result *chunk.Chunk)
- func (scan *Scan) NextSemiOrAntiJoin(keys, left, result *chunk.Chunk, Match bool)
- func (scan *Scan) ScanKeyMatches(keys *chunk.Chunk)
- type ScanInfo
- type ScanOption
- type ScanState
- type ScanType
- type SingleJoinRelation
- type SinkResult
- type SortLayout
- type SortState
- type SortedBlock
- type SortedData
- type SortedDataType
- type SourceResult
- type SourceType
- type State
- type StateOp
- type StateType
- type Stats
- type SubFunc
- type Subgraph2Denominator
- type SubqueryInfo
- type SubstringFunc
- type SumFunc
- type SumOp
- func (s SumOp[ResultT, InputT]) Combine(src *State[ResultT], target *State[ResultT], data *AggrInputData, ...)
- func (s SumOp[ResultT, InputT]) ConstantOperation(s3 *State[ResultT], input *InputT, data *AggrUnaryInput, count int, ...)
- func (s SumOp[ResultT, InputT]) Finalize(s3 *State[ResultT], target *ResultT, data *AggrFinalizeData)
- func (s SumOp[ResultT, InputT]) IgnoreNull() bool
- func (s SumOp[ResultT, InputT]) Init(s2 *State[ResultT], sop StateOp[ResultT])
- func (s SumOp[ResultT, InputT]) Operation(s3 *State[ResultT], input *InputT, data *AggrUnaryInput, sop StateOp[ResultT], ...)
- type SumStateOp
- type TableFilterSet
- type TableInfo
- type TernaryFunc
- type TernaryLambdaWrapper
- type TernaryOp
- type TernaryStandardOperatorWrapper
- type TernaryWrapper
- type TupleDataAllocator
- func (alloc *TupleDataAllocator) Build(segment *TupleDataSegment, pinState *TupleDataPinState, ...)
- func (alloc *TupleDataAllocator) BuildChunkPart(pinState *TupleDataPinState, chunkState *TupleDataChunkState, ...) *TupleDataChunkPart
- func (alloc *TupleDataAllocator) GetBaseHeapPointer(pinState *TupleDataPinState, part *TupleDataChunkPart) unsafe.Pointer
- func (alloc *TupleDataAllocator) GetRowPointer(pinState *TupleDataPinState, part *TupleDataChunkPart) unsafe.Pointer
- func (alloc *TupleDataAllocator) InitChunkState(seg *TupleDataSegment, pinState *TupleDataPinState, ...)
- func (alloc *TupleDataAllocator) InitChunkStateInternal(pinState *TupleDataPinState, chunkState *TupleDataChunkState, offset uint64, ...)
- func (alloc *TupleDataAllocator) PinHeapBlock(pinState *TupleDataPinState, part *TupleDataChunkPart) *storage.BufferHandle
- func (alloc *TupleDataAllocator) PinRowBlock(pinState *TupleDataPinState, part *TupleDataChunkPart) *storage.BufferHandle
- func (alloc *TupleDataAllocator) ReleaseOrStoreHandles(pinState *TupleDataPinState, segment *TupleDataSegment, chunk *TupleDataChunk, ...)
- func (alloc *TupleDataAllocator) ReleaseOrStoreHandles2(segment *TupleDataSegment, pinnedHandles *[]*storage.BufferHandle, ...)
- type TupleDataBlock
- type TupleDataChunk
- type TupleDataChunkIterator
- func (iter *TupleDataChunkIterator) Done() bool
- func (iter *TupleDataChunkIterator) GetChunkState() *TupleDataChunkState
- func (iter *TupleDataChunkIterator) GetCurrentChunkCount() int
- func (iter *TupleDataChunkIterator) GetRowLocations() []unsafe.Pointer
- func (iter *TupleDataChunkIterator) InitCurrentChunk()
- func (iter *TupleDataChunkIterator) Next() bool
- func (iter *TupleDataChunkIterator) Reset()
- type TupleDataChunkPart
- type TupleDataChunkState
- type TupleDataCollection
- func (tuple *TupleDataCollection) Append(pinState *TupleDataPinState, chunkState *TupleDataChunkState, ...)
- func (tuple *TupleDataCollection) AppendUnified(pinState *TupleDataPinState, chunkState *TupleDataChunkState, ...)
- func (tuple *TupleDataCollection) Build(pinState *TupleDataPinState, chunkState *TupleDataChunkState, ...)
- func (tuple *TupleDataCollection) ChunkCount() int
- func (tuple *TupleDataCollection) Count() int
- func (tuple *TupleDataCollection) FinalizePinState(pinState *TupleDataPinState)
- func (tuple *TupleDataCollection) FinalizePinState2(pinState *TupleDataPinState, seg *TupleDataSegment)
- func (tuple *TupleDataCollection) Gather(layout *TupleDataLayout, rowLocs *chunk.Vector, scanSel *chunk.SelectVector, ...)
- func (tuple *TupleDataCollection) InitAppend(pinState *TupleDataPinState, prop TupleDataPinProperties)
- func (tuple *TupleDataCollection) InitScan(state *TupleDataScanState)
- func (tuple *TupleDataCollection) NextScanIndex(state *TupleDataScanState, segIdx *int, chunkIdx *int) bool
- func (tuple *TupleDataCollection) Scan(state *TupleDataScanState, result *chunk.Chunk) bool
- func (tuple *TupleDataCollection) ScanAtIndex(pinState *TupleDataPinState, chunkState *TupleDataChunkState, colIdxs []int, ...)
- func (tuple *TupleDataCollection) Unpin()
- type TupleDataLayout
- type TupleDataPinProperties
- type TupleDataPinState
- type TupleDataScanState
- type TupleDataSegment
- type TypeOp
- type UnaryData
- type UnaryFunc
- type UnaryLambdaWrapper
- type UnaryOp
- type UnaryOp2
- type UnaryOperatorWrapper
- type UnaryWrapper
- type UnorderedSet
- type ValuesListInfo
- type VectorTryCastData
Constants ¶
const ( LOAD_FACTOR = 1.5 HASH_WIDTH = 8 BLOCK_SIZE = 256*1024 - 8 )
const ( NoneSide = 0 LeftSide = 1 << 1 RightSide = 1 << 2 BothSide = LeftSide | RightSide )
const ( ExplainOptionAnalyze = 1 ExplainOptionVerbose = 2 ExplainOptionCosts = 3 ExplainOptionSettings = 4 ExplainOptionGenericPlan = 5 ExplainOptionBuffers = 6 ExplainOptionSerialize = 7 ExplainOptionWal = 8 ExplainOptionTiming = 9 ExplainOptionSummary = 10 ExplainOptionMemory = 11 ExplainOptionFormat = 12 ExplainSerializeNone = 0 ExplainSerializeText = 1 ExplainSerializeBinary = 2 ExplainFormatText = 0 ExplainFormatJSON = 1 ExplainFormatYAML = 2 ExplainFormatXML = 3 )
const ( // 算术运算符 FuncAdd = "+" FuncSubtract = "-" FuncMultiply = "*" FuncDivide = "/" // 比较运算符 FuncEqual = "=" FuncNotEqual = "<>" FuncGreater = ">" FuncGreaterEqual = ">=" FuncLess = "<" FuncLessEqual = "<=" // 逻辑运算符 FuncAnd = "and" FuncOr = "or" FuncNot = "not" // 字符串运算符 FuncLike = "like" FuncNotLike = "not like" // 其它运算符 FuncBetween = "between" FuncCase = "case" FuncCaseWhen = "case when" FuncIn = "in" FuncNotIn = "not in" FuncExists = "exists" FuncNotExists = "not exists" // 函数 FuncDateAdd = "date_add" FuncDateSub = "date_sub" FuncCast = "cast" FuncExtract = "extract" FuncSubstring = "substring" )
const ( DecimalBindData = "decimal" DecimalNegBindData = "decimalNeg" )
const ( VALUES_PER_RADIX = 256 MSD_RADIX_LOCATIONS = VALUES_PER_RADIX + 1 INSERTION_SORT_THRESHOLD = 24 MSD_RADIX_SORT_SIZE_THRESHOLD = 4 )
const (
INVALID_INDEX uint32 = math.MaxUint32
)
Variables ¶
var ExplainOptionNames = []string{
"Invalid Explain Option",
"Analyze",
"Verbose",
"Costs",
"Settings",
"GenericPlan",
"Buffers",
"Serialize",
"Wal",
"Timing",
"Summary",
"Memory",
"Format",
}
Functions ¶
func AddInPlace ¶
AddInPlace left += delta
func ColumnDataCopySwitch ¶
func ColumnDataCopySwitch( metaData *ColumnDataMetaData, srcData *chunk.UnifiedFormat, src *chunk.Vector, offset int, count int, )
func ComputeStringEntrySizes ¶
func ComputeStringEntrySizes( col *chunk.UnifiedFormat, entrySizes []int, sel *chunk.SelectVector, count int, offset int, )
func ComputeTies ¶
func EncodeStringDataPrefix ¶
func EntriesPerBlock ¶
func ExplainLogicalPlan ¶
func ExplainLogicalPlan(root *LogicalOperator) (string, error)
func ExplainPhysicalPlan ¶
func ExplainPhysicalPlan(root *PhysicalOperator) (string, error)
func FillSwitch ¶
func FinalizeStates ¶
func FindSubgraphMatchAndMerge ¶
func FindSubgraphMatchAndMerge(mergeTo *Subgraph2Denominator, findMe uint64, next int, subgraphs []*Subgraph2Denominator)
func GatherVarchar ¶
func GetDistinctIndices ¶
func InitStates ¶
func InitStates( layout *TupleDataLayout, addresses *chunk.Vector, sel *chunk.SelectVector, cnt int, )
func InsertHashesLoop ¶
func InsertionSort ¶
func InsertionSort( origPtr unsafe.Pointer, tempPtr unsafe.Pointer, count int, colOffset int, rowWidth int, totalCompWidth int, offset int, swap bool, )
InsertionSort adapted in less count of values
func IsLogicalFilter ¶
func IsLogicalFilter(op *LogicalOperator) bool
func IsOperator ¶
func Match ¶
func Match( columns *chunk.Chunk, colData []*chunk.UnifiedFormat, layout *TupleDataLayout, rows *chunk.Vector, predicates []string, sel *chunk.SelectVector, cnt int, noMatch *chunk.SelectVector, noMatchCnt *int, ) int
func Move ¶
func Move(dst, src unsafe.Pointer, constants *PDQConstants)
func RadixScatter ¶
func RadixSortLSD ¶
func RadixSortMSD ¶
func RegisterAggrs ¶
func RegisterAggrs()
func RegisterOps ¶
func RegisterOps()
func Scatter ¶
func Scatter( columns *chunk.Chunk, colData []*chunk.UnifiedFormat, layout *RowLayout, rows *chunk.Vector, stringHeap *RowDataCollection, sel *chunk.SelectVector, count int, )
func ScatterStringVector ¶
func SortTiedBlobs ¶
func SortTiedBlobs( sb *SortedBlock, ties []bool, dataPtr unsafe.Pointer, count int, tieCol int, layout *SortLayout)
func SortTiedBlobs2 ¶
func SubSortTiedTuples ¶
func SwapOffsetsGetTmp ¶
func SwapOffsetsGetTmp(src unsafe.Pointer, constants *PDQConstants) unsafe.Pointer
func TemplatedColumnDataCopy ¶
func TemplatedColumnDataCopy[T any]( metaData *ColumnDataMetaData, srcData *chunk.UnifiedFormat, src *chunk.Vector, offset int, count int, cp BaseValueCopy[T], )
func TemplatedCompareVal ¶
func TemplatedFillLoop ¶
func TemplatedGatherLoop ¶
func TemplatedMatch ¶
func TemplatedMatch( columns *chunk.Chunk, colData []*chunk.UnifiedFormat, layout *TupleDataLayout, rows *chunk.Vector, predicates []string, sel *chunk.SelectVector, cnt *int, noMatch *chunk.SelectVector, noMatchCnt *int, noMatchSel bool, )
func TemplatedMatchOp ¶
func TemplatedMatchOp( vec *chunk.Vector, col *chunk.UnifiedFormat, predTyp string, layout *TupleDataLayout, rows *chunk.Vector, sel *chunk.SelectVector, cnt *int, colNo int, noMatch *chunk.SelectVector, noMatchCnt *int, originalCnt int, noMatchSel bool, )
func TemplatedMatchType ¶
func TemplatedRadixScatter ¶
func TemplatedScatter ¶
func TemplatedTryCastLoop ¶
func TieIsBreakable ¶
func TieIsBreakable( tieCol int, rowPtr unsafe.Pointer, layout *SortLayout, ) bool
func TryCastLoop ¶
func TupleDataTemplatedGather ¶
func TupleDataTemplatedGather[T any]( layout *TupleDataLayout, rowLocs *chunk.Vector, colIdx int, scanSel *chunk.SelectVector, scanCnt int, target *chunk.Vector, targetSel *chunk.SelectVector, )
func TupleDataTemplatedGatherSwitch ¶
func TupleDataTemplatedGatherSwitch( layout *TupleDataLayout, rowLocs *chunk.Vector, colIdx int, scanSel *chunk.SelectVector, scanCnt int, target *chunk.Vector, targetSel *chunk.SelectVector, )
func TupleDataTemplatedScatter ¶
func TupleDataTemplatedScatter[T any]( srcFormat *chunk.UnifiedFormat, appendSel *chunk.SelectVector, cnt int, layout *TupleDataLayout, rowLocations *chunk.Vector, heapLocations *chunk.Vector, colIdx int, nVal chunk.ScatterOp[T], )
func TupleDataTemplatedScatterSwitch ¶
func TupleDataTemplatedScatterSwitch( src *chunk.Vector, srcFormat *chunk.UnifiedFormat, appendSel *chunk.SelectVector, cnt int, layout *TupleDataLayout, rowLocations *chunk.Vector, heapLocations *chunk.Vector, colIdx int)
func TupleDataValueStore ¶
func UnaryExecuteStandard ¶
func UnaryFlatLoop ¶
func UnaryFlatLoop[ResultT any, STATE State[ResultT], InputT any, OP AggrOp[ResultT, InputT]]( inputSlice []InputT, data *AggrInputData, statesPtrSlice []unsafe.Pointer, mask *util.Bitmap, count int, aop AggrOp[ResultT, InputT], sop StateOp[ResultT], addOp AddOp[ResultT, InputT], top TypeOp[ResultT], )
func UnaryFlatUpdateLoop ¶
func UnaryFlatUpdateLoop[ResultT any, STATE State[ResultT], InputT any, OP AggrOp[ResultT, InputT]]( inputSlice []InputT, data *AggrInputData, statePtr unsafe.Pointer, count int, mask *util.Bitmap, aop AggrOp[ResultT, InputT], sop StateOp[ResultT], addOp AddOp[ResultT, InputT], top TypeOp[ResultT], )
func UnaryScatter ¶
func UnaryScatterLoop ¶
func UnaryScatterLoop[ResultT any, STATE State[ResultT], InputT any]( inputSlice []InputT, data *AggrInputData, statesPtrSlice []unsafe.Pointer, isel *chunk.SelectVector, ssel *chunk.SelectVector, mask *util.Bitmap, count int, aop AggrOp[ResultT, InputT], sop StateOp[ResultT], addOp AddOp[ResultT, InputT], top TypeOp[ResultT], )
func UnaryUpdate ¶
func UnaryUpdateLoop ¶
func UnaryUpdateLoop[ResultT any, STATE State[ResultT], InputT any, OP AggrOp[ResultT, InputT]]( inputSlice []InputT, data *AggrInputData, statePtr unsafe.Pointer, count int, mask *util.Bitmap, selVec *chunk.SelectVector, aop AggrOp[ResultT, InputT], sop StateOp[ResultT], addOp AddOp[ResultT, InputT], top TypeOp[ResultT], )
func UpdateDenom ¶
func UpdateDenom(rel2Dem *Subgraph2Denominator, rel2TDom *RelationToTDom)
func UpdateStates ¶
func VectorTryCastOperator ¶
func WildcardMatch ¶
WildcardMatch implements wildcard pattern match algorithm. pattern and target are ascii characters TODO: add \_ and \%
func WriteExprTree ¶
func WriteExprs ¶
func WriteExprsTree ¶
func WriteMap ¶
func WriteMap[K comparable, V any](ctx *FormatCtx, m map[K]V)
func WriteMapTree ¶
func WriteMapTree[K comparable, V any](tree treeprint.Tree, m map[K]V)
Types ¶
type AddFunc ¶
type AddFunc struct {
}
func (AddFunc) Register ¶
func (add AddFunc) Register(funcList FunctionList)
type AggrFinalizeData ¶
type AggrFinalizeData struct {
// contains filtered or unexported fields
}
func NewAggrFinalizeData ¶
func NewAggrFinalizeData(result *chunk.Vector, input *AggrInputData) *AggrFinalizeData
func (*AggrFinalizeData) ReturnNull ¶
func (data *AggrFinalizeData) ReturnNull()
type AggrHTAppendState ¶
type AggrHTAppendState struct {
// contains filtered or unexported fields
}
func NewAggrHTAppendState ¶
func NewAggrHTAppendState() *AggrHTAppendState
type AggrInputData ¶
type AggrInputData struct {
}
func NewAggrInputData ¶
func NewAggrInputData() *AggrInputData
type AggrObject ¶
type AggrObject struct {
// contains filtered or unexported fields
}
func CreateAggrObjects ¶
func CreateAggrObjects(aggregates []*Expr) []*AggrObject
func NewAggrObject ¶
func NewAggrObject(aggr *Expr) *AggrObject
type AggrOp ¶
type AggrOp[ResultT any, InputT any] interface { Init(*State[ResultT], StateOp[ResultT]) Combine(*State[ResultT], *State[ResultT], *AggrInputData, StateOp[ResultT], TypeOp[ResultT]) Operation(*State[ResultT], *InputT, *AggrUnaryInput, StateOp[ResultT], AddOp[ResultT, InputT], TypeOp[ResultT]) ConstantOperation(*State[ResultT], *InputT, *AggrUnaryInput, int, StateOp[ResultT], AddOp[ResultT, InputT], TypeOp[ResultT]) Finalize(*State[ResultT], *ResultT, *AggrFinalizeData) IgnoreNull() bool }
type AggrUnaryInput ¶
type AggrUnaryInput struct {
// contains filtered or unexported fields
}
func NewAggrUnaryInput ¶
func NewAggrUnaryInput(input *AggrInputData, mask *util.Bitmap) *AggrUnaryInput
type AvgFunc ¶
type AvgFunc struct {
}
func (AvgFunc) Register ¶
func (AvgFunc) Register(funcList FunctionList)
type AvgOp ¶
func (AvgOp[ResultT, InputT]) ConstantOperation ¶
func (AvgOp[ResultT, InputT]) Finalize ¶
func (AvgOp[ResultT, InputT]) Finalize( s3 *State[ResultT], target *ResultT, data *AggrFinalizeData)
func (AvgOp[ResultT, InputT]) IgnoreNull ¶
type AvgStateOp ¶
type AvgStateOp[T any] struct { }
func (*AvgStateOp[T]) AddValues ¶
func (as *AvgStateOp[T]) AddValues(s *State[T], cnt int)
func (*AvgStateOp[T]) Combine ¶
func (as *AvgStateOp[T]) Combine( src *State[T], target *State[T], _ *AggrInputData, top TypeOp[T])
func (*AvgStateOp[T]) Init ¶
func (as *AvgStateOp[T]) Init(s *State[T])
type BaseInfo ¶
type BaseInfo struct {
Database string // 数据库名
Table string // 表名
Name string // 列名
Alias string
ColRef ColumnBind // 列引用(relationTag, columnPos)
Depth int // 相关子查询深度(>0表示相关列)
BelongCtx *BindContext // 所属的绑定上下文
}
列信息 - 用于列引用表达式
type BaseValueCopy ¶
type BaseValueCopy[T any] interface { Assign(metaData *ColumnDataMetaData, dst, src unsafe.Pointer, dstIdx, srcIdx int) Operation(dst, src *T) }
type BinaryFunc ¶
type BinaryLambdaWrapper ¶
type BinaryWrapper ¶
type BindCastFunc ¶
type BindCastFunc struct {
// contains filtered or unexported fields
}
type BindCastFuncType ¶
type BindCastFuncType func(input *BindCastInput, src, dst common.LType) *BoundCastInfo
type BindCastInfo ¶
type BindCastInfo struct{}
type BindCastInput ¶
type BindCastInput struct {
// contains filtered or unexported fields
}
type BindContext ¶
type BindContext struct {
// contains filtered or unexported fields
}
func NewBindContext ¶
func NewBindContext(parent *BindContext) *BindContext
func (*BindContext) AddBinding ¶
func (bc *BindContext) AddBinding(alias string, b *Binding) error
func (*BindContext) AddContext ¶
func (bc *BindContext) AddContext(obc *BindContext) error
func (*BindContext) BindColumn ¶
func (bc *BindContext) BindColumn(table, column string, depth int) (*Expr, error)
func (*BindContext) Format ¶
func (bc *BindContext) Format(ctx *FormatCtx)
func (*BindContext) GetBinding ¶
func (bc *BindContext) GetBinding(name string) (*Binding, error)
func (*BindContext) GetCteBinding ¶
func (bc *BindContext) GetCteBinding(name string) *Binding
func (*BindContext) GetMatchingBinding ¶
func (bc *BindContext) GetMatchingBinding(table, column string) (*Binding, int, error)
func (*BindContext) Print ¶
func (bc *BindContext) Print(tree treeprint.Tree)
func (*BindContext) RemoveContext ¶
func (bc *BindContext) RemoveContext(obList []*Binding)
type BindingType ¶
type BindingType int
const ( BT_BASE BindingType = iota BT_TABLE BT_DUMMY BT_CATALOG_ENTRY BT_Subquery )
func (BindingType) String ¶
func (bt BindingType) String() string
type BlockAppendEntry ¶
type BlockAppendEntry struct {
// contains filtered or unexported fields
}
type BoolFunc ¶
type BoolFunc struct {
}
func (BoolFunc) Register ¶
func (BoolFunc) Register(funcList FunctionList)
type BoundCastData ¶
type BoundCastData struct {
}
BoundCastData generated during bind of cast, used during execution of cast
type BoundCastInfo ¶
type BoundCastInfo struct {
// contains filtered or unexported fields
}
func BoolCastToSwitch ¶
func BoolCastToSwitch( input *BindCastInput, src, dst common.LType, ) *BoundCastInfo
func DecimalCastToSwitch ¶
func DecimalCastToSwitch( input *BindCastInput, src, dst common.LType, ) *BoundCastInfo
func DefaultCastFunc ¶
func DefaultCastFunc( input *BindCastInput, src, dst common.LType) *BoundCastInfo
func FloatCastToSwitch ¶
func FloatCastToSwitch( input *BindCastInput, src, dst common.LType, ) *BoundCastInfo
func HugeintCastToSwitch ¶
func HugeintCastToSwitch( input *BindCastInput, src, dst common.LType, ) *BoundCastInfo
func IntegerCastToSwitch ¶
func IntegerCastToSwitch( input *BindCastInput, src, dst common.LType, ) *BoundCastInfo
func NumericCastSwitch ¶
func NumericCastSwitch( input *BindCastInput, src, dst common.LType, ) *BoundCastInfo
func StringCastToSwitch ¶
func StringCastToSwitch( input *BindCastInput, src, dst common.LType, ) *BoundCastInfo
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func (*Builder) CastLogicalOperatorToTypes ¶
func (b *Builder) CastLogicalOperatorToTypes( targetTyps []common.LType, root *LogicalOperator) (*LogicalOperator, error)
func (*Builder) CreatePhyPlan ¶
func (b *Builder) CreatePhyPlan(root *LogicalOperator) (*PhysicalOperator, error)
func (*Builder) CreatePlan ¶
func (b *Builder) CreatePlan(ctx *BindContext, root *LogicalOperator) (*LogicalOperator, error)
func (*Builder) Optimize ¶
func (b *Builder) Optimize(ctx *BindContext, root *LogicalOperator) (*LogicalOperator, error)
============== Optimize plan ==============
type CardinalityEstimator ¶
type CardinalityEstimator struct {
// contains filtered or unexported fields
}
func NewCardinalityEstimator ¶
func NewCardinalityEstimator(txn *storage.Txn) *CardinalityEstimator
func (*CardinalityEstimator) AddColumnToRelationMap ¶
func (est *CardinalityEstimator) AddColumnToRelationMap(tableIndex, columnIndex uint64)
func (*CardinalityEstimator) AddRelationColumnMapping ¶
func (est *CardinalityEstimator) AddRelationColumnMapping( get *LogicalOperator, relId uint64) error
func (*CardinalityEstimator) AddRelationTdom ¶
func (est *CardinalityEstimator) AddRelationTdom(filterInfo *FilterInfo)
func (*CardinalityEstimator) AddRelationToColumnMapping ¶
func (est *CardinalityEstimator) AddRelationToColumnMapping(key, value ColumnBind)
func (*CardinalityEstimator) AddToEquivalenceSets ¶
func (est *CardinalityEstimator) AddToEquivalenceSets(filterInfo *FilterInfo, set []uint64)
func (*CardinalityEstimator) CopyRelationMap ¶
func (est *CardinalityEstimator) CopyRelationMap(cmap ColumnBindMap)
func (*CardinalityEstimator) DetermineMatchingEquivalentSets ¶
func (est *CardinalityEstimator) DetermineMatchingEquivalentSets(filterInfo *FilterInfo) []uint64
func (*CardinalityEstimator) EmptyFilter ¶
func (est *CardinalityEstimator) EmptyFilter(filterInfo *FilterInfo) bool
func (*CardinalityEstimator) EstimateBaseTableCard ¶
func (est *CardinalityEstimator) EstimateBaseTableCard(node *JoinNode, op *LogicalOperator)
func (*CardinalityEstimator) EstimateCardWithSet ¶
func (est *CardinalityEstimator) EstimateCardWithSet(newset *JoinRelationSet) float64
func (*CardinalityEstimator) EstimateCrossProduct ¶
func (est *CardinalityEstimator) EstimateCrossProduct(left, right *JoinNode) float64
func (*CardinalityEstimator) GetTableFilters ¶
func (est *CardinalityEstimator) GetTableFilters(op *LogicalOperator, tableIndex uint64) *TableFilterSet
func (*CardinalityEstimator) InitCardinalityEstimatorProps ¶
func (est *CardinalityEstimator) InitCardinalityEstimatorProps(nodeOps []*NodeOp, filterInfos []*FilterInfo) error
func (*CardinalityEstimator) InitEquivalentRelations ¶
func (est *CardinalityEstimator) InitEquivalentRelations(filterInfos []*FilterInfo)
func (*CardinalityEstimator) InitTotalDomains ¶
func (est *CardinalityEstimator) InitTotalDomains()
func (*CardinalityEstimator) MergeBindings ¶
func (est *CardinalityEstimator) MergeBindings(bindIdx uint64, relId uint64, cmaps []ColumnBindMap)
func (*CardinalityEstimator) SingleColumnFilter ¶
func (est *CardinalityEstimator) SingleColumnFilter(filterInfo *FilterInfo) bool
func (*CardinalityEstimator) UpdateTotalDomains ¶
func (est *CardinalityEstimator) UpdateTotalDomains(node *JoinNode, op *LogicalOperator) error
type CaseFunc ¶
type CaseFunc struct {
}
func (CaseFunc) Register ¶
func (CaseFunc) Register(funcList FunctionList)
type CastFuncType ¶
type CastFuncType func(src, res *chunk.Vector, count int, params *CastParams) bool
func MakeCastFunc ¶
func MakeCastFunc[T any, R any](op CastOp[T, R]) CastFuncType
type CastFunctionSet ¶
type CastFunctionSet struct {
// contains filtered or unexported fields
}
func NewCastFunctionSet ¶
func NewCastFunctionSet() *CastFunctionSet
func (*CastFunctionSet) GetCastFunc ¶
func (castSet *CastFunctionSet) GetCastFunc(src, dst common.LType) *BoundCastInfo
func (*CastFunctionSet) ImplicitCastCost ¶
func (castSet *CastFunctionSet) ImplicitCastCost(src, dst common.LType) int64
type CastParams ¶
type CastParams struct {
// contains filtered or unexported fields
}
type CatalogTable ¶
type ColumnBind ¶
type ColumnBind [2]uint64
func NewColumnBind ¶
func NewColumnBind(a, b uint64) ColumnBind
func (ColumnBind) String ¶
func (bind ColumnBind) String() string
type ColumnBindCountMap ¶
type ColumnBindCountMap map[ColumnBind]int
type ColumnBindMap ¶
type ColumnBindMap map[ColumnBind]ColumnBind
type ColumnBindPosMap ¶
type ColumnBindPosMap map[ColumnBind]int
type ColumnBindSet ¶
type ColumnBindSet map[ColumnBind]bool
type ColumnDataCollection ¶
type ColumnDataCollection struct {
// contains filtered or unexported fields
}
func NewColumnDataCollection ¶
func NewColumnDataCollection(typs []common.LType) *ColumnDataCollection
func (*ColumnDataCollection) Append ¶
func (cdc *ColumnDataCollection) Append(input *chunk.Chunk)
func (*ColumnDataCollection) Count ¶
func (cdc *ColumnDataCollection) Count() int
func (*ColumnDataCollection) NextScanIndex ¶
func (cdc *ColumnDataCollection) NextScanIndex( state *ColumnDataScanState, chunkIdx *int, rowIdx *int, ) bool
func (*ColumnDataCollection) ReadVector ¶
func (cdc *ColumnDataCollection) ReadVector( state *ColumnDataScanState, srcVec *chunk.Vector, dstVec *chunk.Vector, count int, ) int
func (*ColumnDataCollection) Scan ¶
func (cdc *ColumnDataCollection) Scan( state *ColumnDataScanState, output *chunk.Chunk) bool
type ColumnDataMetaData ¶
type ColumnDataMetaData struct {
// contains filtered or unexported fields
}
type ColumnDataScanState ¶
type ColumnDataScanState struct {
// contains filtered or unexported fields
}
type ColumnPrune ¶
type ColumnPrune struct {
// contains filtered or unexported fields
}
func NewColumnPrune ¶
func NewColumnPrune(txn *storage.Txn) *ColumnPrune
type ConstValue ¶
type ConstValue struct {
Type ConstType
// 每种类型一个具体字段
Integer int64
Decimal string
String string
Float float64
Date string
Interval struct {
Value int64
Unit string
}
Boolean bool
}
ConstValue represents a constant value with its type and actual value
func NewBooleanConst ¶
func NewBooleanConst(value bool) ConstValue
NewBooleanConst creates a new boolean constant
func NewDateConst ¶
func NewDateConst(value string) ConstValue
NewDateConst creates a new date constant
func NewDecimalConst ¶
func NewDecimalConst(value string) ConstValue
NewDecimalConst creates a new decimal constant
func NewFloatConst ¶
func NewFloatConst(value float64) ConstValue
NewFloatConst creates a new float constant
func NewIntegerConst ¶
func NewIntegerConst(value int64) ConstValue
NewIntegerConst creates a new integer constant
func NewIntervalConst ¶
func NewIntervalConst(value int64, unit string) ConstValue
NewIntervalConst creates a new interval constant
func NewStringConst ¶
func NewStringConst(value string) ConstValue
NewStringConst creates a new string constant
func (ConstValue) GetBoolean ¶
func (c ConstValue) GetBoolean() (bool, error)
GetBoolean returns the boolean value of the constant
func (ConstValue) GetDate ¶
func (c ConstValue) GetDate() (string, error)
GetDate returns the date value of the constant
func (ConstValue) GetDecimal ¶
func (c ConstValue) GetDecimal() (string, error)
GetDecimal returns the decimal value of the constant
func (ConstValue) GetFloat ¶
func (c ConstValue) GetFloat() (float64, error)
GetFloat returns the float value of the constant
func (ConstValue) GetInteger ¶
func (c ConstValue) GetInteger() (int64, error)
GetInteger returns the integer value of the constant
func (ConstValue) GetInterval ¶
func (c ConstValue) GetInterval() (int64, string, error)
GetInterval returns the interval value and unit of the constant
func (ConstValue) GetString ¶
func (c ConstValue) GetString() (string, error)
GetString returns the string value of the constant
func (ConstValue) IsNull ¶
func (c ConstValue) IsNull() bool
IsNull returns whether the constant is null
type CountFunc ¶
type CountFunc struct {
}
func (CountFunc) Register ¶
func (CountFunc) Register(funcList FunctionList)
type CountOp ¶
func (CountOp[ResultT, InputT]) ConstantOperation ¶
func (CountOp[ResultT, InputT]) Finalize ¶
func (CountOp[ResultT, InputT]) Finalize( s3 *State[ResultT], target *ResultT, data *AggrFinalizeData)
func (CountOp[ResultT, InputT]) IgnoreNull ¶
type CountStateOp ¶
type CountStateOp[T any] struct { }
func (*CountStateOp[T]) AddValues ¶
func (as *CountStateOp[T]) AddValues(s *State[T], cnt int)
func (*CountStateOp[T]) Combine ¶
func (as *CountStateOp[T]) Combine( src *State[T], target *State[T], _ *AggrInputData, top TypeOp[T])
func (*CountStateOp[T]) Init ¶
func (as *CountStateOp[T]) Init(s *State[T])
type CrossProduct ¶
type CrossProduct struct {
// contains filtered or unexported fields
}
func NewCrossProduct ¶
func NewCrossProduct(types []common.LType) *CrossProduct
func (*CrossProduct) Execute ¶
func (cross *CrossProduct) Execute(input, output *chunk.Chunk) (OperatorResult, error)
func (*CrossProduct) Sink ¶
func (cross *CrossProduct) Sink(input *chunk.Chunk)
type CrossProductExec ¶
type CrossProductExec struct {
// contains filtered or unexported fields
}
func NewCrossProductExec ¶
func NewCrossProductExec(rhs *ColumnDataCollection) *CrossProductExec
func (*CrossProductExec) Execute ¶
func (cross *CrossProductExec) Execute(input, output *chunk.Chunk) (OperatorResult, error)
func (*CrossProductExec) NextValue ¶
func (cross *CrossProductExec) NextValue(input, output *chunk.Chunk) bool
func (*CrossProductExec) Reset ¶
func (cross *CrossProductExec) Reset()
type CrossStage ¶
type CrossStage int
const ( CROSS_INIT CrossStage = iota CROSS_BUILD CROSS_PROBE )
type DateAdd ¶
type DateAdd struct {
}
func (DateAdd) Register ¶
func (DateAdd) Register(funcList FunctionList)
type DateSub ¶
type DateSub struct {
}
func (DateSub) Register ¶
func (DateSub) Register(funcList FunctionList)
type DecimalAdd ¶
type DecimalAdd struct {
}
func (*DecimalAdd) AddConstant ¶
type DevideFunc ¶
type DevideFunc struct {
}
func (DevideFunc) Register ¶
func (DevideFunc) Register(funcList FunctionList)
type DistinctAggrCollectionInfo ¶
type DistinctAggrCollectionInfo struct {
// contains filtered or unexported fields
}
func CreateDistinctAggrCollectionInfo ¶
func CreateDistinctAggrCollectionInfo(aggregates []*Expr) *DistinctAggrCollectionInfo
func NewDistinctAggrCollectionInfo ¶
func NewDistinctAggrCollectionInfo( aggregates []*Expr, indices []int, ) *DistinctAggrCollectionInfo
func (*DistinctAggrCollectionInfo) CreateTableIndexMap ¶
func (daci *DistinctAggrCollectionInfo) CreateTableIndexMap() int
type DistinctAggrData ¶
type DistinctAggrData struct {
// contains filtered or unexported fields
}
func NewDistinctAggrData ¶
func NewDistinctAggrData( info *DistinctAggrCollectionInfo, groups GroupingSet, groupExprs []*Expr, rawInputTypes []common.LType, ) *DistinctAggrData
func (*DistinctAggrData) IsDistinct ¶
func (dad *DistinctAggrData) IsDistinct(index int) bool
type DoubleAdd ¶
type DoubleAdd struct{}
func (DoubleAdd) AddConstant ¶
type DoubleInt32Add ¶
type DoubleInt32Add struct{}
func (DoubleInt32Add) AddConstant ¶
type ET_JoinType ¶
type ET_JoinType int
const ( ET_JoinTypeCross ET_JoinType = iota ET_JoinTypeLeft ET_JoinTypeInner )
type ET_SubqueryType ¶
type ET_SubqueryType int
const ( ET_SubqueryTypeScalar ET_SubqueryType = iota ET_SubqueryTypeExists ET_SubqueryTypeNotExists ET_SubqueryTypeIn ET_SubqueryTypeNotIn )
type EqualFunc ¶
type EqualFunc struct {
}
func (EqualFunc) Register ¶
func (equal EqualFunc) Register(funcList FunctionList)
type EstimatedProperties ¶
type EstimatedProperties struct {
// contains filtered or unexported fields
}
func NewEstimatedProperties ¶
func NewEstimatedProperties(card, cost float64) *EstimatedProperties
func (EstimatedProperties) Copy ¶
func (e EstimatedProperties) Copy() *EstimatedProperties
type ExplainBuffer ¶
type ExplainBuffer struct {
// contains filtered or unexported fields
}
func NewExplainBuffer ¶
func NewExplainBuffer() *ExplainBuffer
func (*ExplainBuffer) AppendLine ¶
func (eb *ExplainBuffer) AppendLine(line string, level int, newNode bool)
func (*ExplainBuffer) AppendTitle ¶
func (eb *ExplainBuffer) AppendTitle(title string)
func (*ExplainBuffer) String ¶
func (eb *ExplainBuffer) String() string
type ExplainCtx ¶
type ExplainCtx struct {
// contains filtered or unexported fields
}
type ExplainOption ¶
type ExplainOption struct {
// contains filtered or unexported fields
}
type ExplainOptions ¶
type ExplainOptions struct {
// contains filtered or unexported fields
}
func NewExplainOptions ¶
func NewExplainOptions() *ExplainOptions
func (*ExplainOptions) SetBooleanOption ¶
func (eopt *ExplainOptions) SetBooleanOption(option int, enabled bool)
func (*ExplainOptions) SetDefaultValues ¶
func (eopt *ExplainOptions) SetDefaultValues()
func (*ExplainOptions) SetFormatOption ¶
func (eopt *ExplainOptions) SetFormatOption(option int, format int)
func (*ExplainOptions) SetSerializeOption ¶
func (eopt *ExplainOptions) SetSerializeOption(option int, serialize int)
func (*ExplainOptions) String ¶
func (eopt *ExplainOptions) String() string
type ExplainPosition ¶
type ExplainPosition struct {
// contains filtered or unexported fields
}
type Expr ¶
type Expr struct {
BaseInfo
FunctionInfo
SubqueryInfo
JoinInfo
TableInfo
ValuesListInfo
ConstValue ConstValue // 常量值
OrderByInfo
CTEInfo
Typ ET
DataTyp common.LType
Index uint64
Children []*Expr
}
func AddCastToType ¶
type ExprExec ¶
type ExprExec struct {
// contains filtered or unexported fields
}
func NewExprExec ¶
type ExprExecState ¶
type ExprExecState struct {
// contains filtered or unexported fields
}
type ExprState ¶
type ExprState struct {
// contains filtered or unexported fields
}
func NewExprState ¶
func NewExprState(expr *Expr, eeState *ExprExecState) *ExprState
type ExtractFunc ¶
type ExtractFunc struct {
}
func (ExtractFunc) Register ¶
func (ExtractFunc) Register(funcList FunctionList)
type FilterInfo ¶
type FilterInfo struct {
// contains filtered or unexported fields
}
type FormatCtx ¶
type FormatCtx struct {
// contains filtered or unexported fields
}
func (*FormatCtx) RestoreOffset ¶
func (fc *FormatCtx) RestoreOffset()
func (*FormatCtx) WriteStrings ¶
type FuncNullHandling ¶
type FuncNullHandling int
const ( DefaultNullHandling FuncNullHandling = 0 SpecialHandling FuncNullHandling = 1 )
type FuncSideEffects ¶
type FuncSideEffects int
const ( NoSideEffects FuncSideEffects = 0 HasSideEffects FuncSideEffects = 1 )
type Function ¶
type Function struct {
// contains filtered or unexported fields
}
func GetCountAggr ¶
func GetSumAggr ¶
func UnaryAggregate ¶
func (*Function) IsFunction ¶
func (*Function) IsOperator ¶
type FunctionBinder ¶
type FunctionBinder struct {
}
func (*FunctionBinder) BindAggrFunc ¶
func (binder *FunctionBinder) BindAggrFunc( name string, args []*Expr, isOperator bool, ) *Expr
func (*FunctionBinder) BindAggrFunc2 ¶
func (binder *FunctionBinder) BindAggrFunc2( fun *Function, args []*Expr, isOperator bool, ) *Expr
func (*FunctionBinder) BindFunc ¶
func (binder *FunctionBinder) BindFunc( name string, set *FunctionSet, args []common.LType, ) int
func (*FunctionBinder) BindFunc2 ¶
func (binder *FunctionBinder) BindFunc2( name string, set *FunctionSet, args []*Expr, ) int
func (*FunctionBinder) BindFuncByArgs ¶
func (binder *FunctionBinder) BindFuncByArgs( name string, set *FunctionSet, args []common.LType, ) int
func (*FunctionBinder) BindFuncByArgs2 ¶
func (binder *FunctionBinder) BindFuncByArgs2( name string, set *FunctionSet, args []common.LType, ) []int
func (*FunctionBinder) BindFuncCost ¶
func (binder *FunctionBinder) BindFuncCost( fun *Function, args []common.LType, ) int64
func (*FunctionBinder) BindScalarFunc ¶
func (binder *FunctionBinder) BindScalarFunc( name string, args []*Expr, isOperator bool, ) *Expr
func (*FunctionBinder) BindScalarFunc2 ¶
func (binder *FunctionBinder) BindScalarFunc2( fun *Function, args []*Expr, isOperator bool, ) *Expr
func (*FunctionBinder) CastToFuncArgs ¶
func (binder *FunctionBinder) CastToFuncArgs(fun *Function, args []*Expr)
type FunctionData ¶
type FunctionData struct {
// contains filtered or unexported fields
}
func BindDecimalAddSubstract ¶
func BindDecimalAddSubstract(fun *Function, args []*Expr) *FunctionData
func BindDecimalAvg ¶
func BindDecimalAvg(fun *Function, args []*Expr) *FunctionData
func BindDecimalCaseWhen ¶
func BindDecimalCaseWhen(fun *Function, args []*Expr) *FunctionData
func BindDecimalDivide ¶
func BindDecimalDivide(fun *Function, args []*Expr) *FunctionData
func BindDecimalMinMax ¶
func BindDecimalMinMax(fun *Function, args []*Expr) *FunctionData
func BindDecimalMultiply ¶
func BindDecimalMultiply(fun *Function, args []*Expr) *FunctionData
func BindDecimalSum ¶
func BindDecimalSum(fun *Function, args []*Expr) *FunctionData
func DecimalNegateBind ¶
func DecimalNegateBind(fun *Function, args []*Expr) *FunctionData
func NopDecimalBind ¶
func NopDecimalBind(fun *Function, args []*Expr) *FunctionData
type FunctionInfo ¶
type FunctionInfo struct {
FunImpl *Function // 函数实现
BindInfo *FunctionData // 函数绑定信息
}
函数信息 - 用于函数和运算符表达式
type FunctionList ¶
type FunctionList map[string]*FunctionSet
func (FunctionList) Add ¶
func (flist FunctionList) Add(name string, set *FunctionSet)
type FunctionSet ¶
type FunctionSet struct {
// contains filtered or unexported fields
}
func NewFunctionSet ¶
func NewFunctionSet(name string, ftyp FuncType) *FunctionSet
func (*FunctionSet) Add ¶
func (set *FunctionSet) Add(fun *Function)
func (*FunctionSet) GetFunc ¶
func (set *FunctionSet) GetFunc(offset int) *Function
func (*FunctionSet) GetFuncByArgs ¶
func (set *FunctionSet) GetFuncByArgs(args []common.LType) *Function
type GenerateJoinRelation ¶
type GenerateJoinRelation struct {
// contains filtered or unexported fields
}
type GenericUnaryWrapper ¶
type Greater ¶
type Greater struct {
}
func (Greater) Register ¶
func (Greater) Register(funcList FunctionList)
type GreaterThan ¶
type GreaterThan struct {
}
func (GreaterThan) Register ¶
func (GreaterThan) Register(funcList FunctionList)
type GroupedAggrData ¶
type GroupedAggrData struct {
// contains filtered or unexported fields
}
func (*GroupedAggrData) GroupCount ¶
func (gad *GroupedAggrData) GroupCount() int
func (*GroupedAggrData) InitChildrenOutput ¶
func (gad *GroupedAggrData) InitChildrenOutput(outputs []*Expr)
func (*GroupedAggrData) InitDistinct ¶
func (gad *GroupedAggrData) InitDistinct( aggr *Expr, groups []*Expr, rawInputTypes []common.LType, )
func (*GroupedAggrData) InitDistinctGroups ¶
func (gad *GroupedAggrData) InitDistinctGroups( groups []*Expr, )
func (*GroupedAggrData) InitGroupby ¶
func (gad *GroupedAggrData) InitGroupby( groups []*Expr, exprs []*Expr, groupingFuncs [][]int, refChildrenOutput []*Expr, )
func (*GroupedAggrData) InitGroupbyGroups ¶
func (gad *GroupedAggrData) InitGroupbyGroups(groups []*Expr)
func (*GroupedAggrData) SetGroupingFuncs ¶
func (gad *GroupedAggrData) SetGroupingFuncs(funcs [][]int)
type GroupedAggrHashTable ¶
type GroupedAggrHashTable struct {
// contains filtered or unexported fields
}
func NewGroupedAggrHashTable ¶
func NewGroupedAggrHashTable( groupTypes []common.LType, payloadTypes []common.LType, childrenOutputTypes []common.LType, aggrObjs []*AggrObject, initCap int, bufMgr *storage.BufferManager, ) *GroupedAggrHashTable
func (*GroupedAggrHashTable) AddChunk2 ¶
func (aht *GroupedAggrHashTable) AddChunk2( state *AggrHTAppendState, groups *chunk.Chunk, payload *chunk.Chunk, childrenOutput *chunk.Chunk, filter []int, ) int
func (*GroupedAggrHashTable) Count ¶
func (aht *GroupedAggrHashTable) Count() int
func (*GroupedAggrHashTable) FetchAggregates ¶
func (aht *GroupedAggrHashTable) FetchAggregates(groups, result *chunk.Chunk)
func (*GroupedAggrHashTable) Finalize ¶
func (aht *GroupedAggrHashTable) Finalize()
func (*GroupedAggrHashTable) FindOrCreateGroups ¶
func (aht *GroupedAggrHashTable) FindOrCreateGroups( state *AggrHTAppendState, groups *chunk.Chunk, groupHashes *chunk.Vector, addresses *chunk.Vector, newGroupsOut *chunk.SelectVector, childrenOutput *chunk.Chunk, ) int
func (*GroupedAggrHashTable) Resize ¶
func (aht *GroupedAggrHashTable) Resize(size int)
func (*GroupedAggrHashTable) ResizeThreshold ¶
func (aht *GroupedAggrHashTable) ResizeThreshold() int
func (*GroupedAggrHashTable) Scan ¶
func (aht *GroupedAggrHashTable) Scan(state *TupleDataScanState, result *chunk.Chunk) int
func (*GroupedAggrHashTable) UpdateBlockPointers ¶
func (aht *GroupedAggrHashTable) UpdateBlockPointers()
func (*GroupedAggrHashTable) Verify ¶
func (aht *GroupedAggrHashTable) Verify()
type GroupingSet ¶
type GroupingSet map[int]struct{}
type HashAggr ¶
type HashAggr struct {
// contains filtered or unexported fields
}
func NewHashAggr ¶
func (*HashAggr) DistinctGrouping ¶
func (haggr *HashAggr) DistinctGrouping( groupingData *HashAggrGroupingData, groupingIdx int, )
func (*HashAggr) FetechAggregates ¶
func (haggr *HashAggr) FetechAggregates(state *HashAggrScanState, groups, output *chunk.Chunk) OperatorResult
func (*HashAggr) FinalizeDistinct ¶
func (haggr *HashAggr) FinalizeDistinct()
func (*HashAggr) FinalizeInternal ¶
func (*HashAggr) GetData ¶
func (haggr *HashAggr) GetData(state *HashAggrScanState, output, rawInput *chunk.Chunk) OperatorResult
func (*HashAggr) SinkDistinct ¶
type HashAggrGroupingData ¶
type HashAggrGroupingData struct {
// contains filtered or unexported fields
}
func NewHashAggrGroupingData ¶
func NewHashAggrGroupingData( groupingSet GroupingSet, aggrData *GroupedAggrData, info *DistinctAggrCollectionInfo, ) *HashAggrGroupingData
type HashAggrScanState ¶
type HashAggrScanState struct {
// contains filtered or unexported fields
}
func NewHashAggrScanState ¶
func NewHashAggrScanState() *HashAggrScanState
type HashAggrState ¶
type HashAggrState int
const ( HAS_INIT HashAggrState = iota HAS_BUILD HAS_SCAN )
type HashJoin ¶
type HashJoin struct {
// contains filtered or unexported fields
}
func NewHashJoin ¶
func NewHashJoin(op *PhysicalOperator, conds []*Expr) *HashJoin
type HashJoinStage ¶
type HashJoinStage int
const ( HJS_INIT HashJoinStage = iota HJS_BUILD HJS_PROBE HJS_SCAN_HT HJS_DONE )
type HugeintAdd ¶
type HugeintAdd struct {
}
func (*HugeintAdd) AddConstant ¶
type HugeintAddInt64 ¶
type HugeintAddInt64 struct {
}
func (*HugeintAddInt64) AddConstant ¶
type InFunc ¶
type InFunc struct {
}
func (InFunc) Register ¶
func (in InFunc) Register(funcList FunctionList)
type InWhichClause ¶
type InWhichClause int
const ( IWC_SELECT InWhichClause = iota IWC_WHERE IWC_GROUP IWC_HAVING IWC_ORDER IWC_LIMIT IWC_JOINON IWC_VALUES //for insert ... values )
type JoinHashTable ¶
type JoinHashTable struct {
// contains filtered or unexported fields
}
func NewJoinHashTable ¶
func NewJoinHashTable(conds []*Expr, buildTypes []common.LType, joinTyp LOT_JoinType) *JoinHashTable
func (*JoinHashTable) ApplyBitmask ¶
func (jht *JoinHashTable) ApplyBitmask(hashes *chunk.Vector, cnt int)
func (*JoinHashTable) ApplyBitmask2 ¶
func (jht *JoinHashTable) ApplyBitmask2( hashes *chunk.Vector, sel *chunk.SelectVector, cnt int, pointers *chunk.Vector, )
func (*JoinHashTable) Build ¶
func (jht *JoinHashTable) Build(keys *chunk.Chunk, payload *chunk.Chunk)
func (*JoinHashTable) Finalize ¶
func (jht *JoinHashTable) Finalize()
func (*JoinHashTable) InitPointerTable ¶
func (jht *JoinHashTable) InitPointerTable()
func (*JoinHashTable) InsertHashes ¶
type JoinInfo ¶
type JoinInfo struct {
// 连接相关
JoinTyp ET_JoinType // 连接类型(交叉/左连接/内连接)
On *Expr // 连接条件
}
连接信息 - 用于连接表达式
type JoinNode ¶
type JoinNode struct {
// contains filtered or unexported fields
}
func NewJoinNode ¶
func NewJoinNode(set *JoinRelationSet, baseCard float64) *JoinNode
type JoinOrderOptimizer ¶
type JoinOrderOptimizer struct {
// contains filtered or unexported fields
}
func NewJoinOrderOptimizer ¶
func NewJoinOrderOptimizer(txn *storage.Txn) *JoinOrderOptimizer
func (*JoinOrderOptimizer) ComputeCost ¶
func (joinOrder *JoinOrderOptimizer) ComputeCost(left, right *JoinNode, expectedCard float64) float64
func (*JoinOrderOptimizer) Optimize ¶
func (joinOrder *JoinOrderOptimizer) Optimize(root *LogicalOperator) (*LogicalOperator, error)
type JoinRelationSet ¶
type JoinRelationSet struct {
// contains filtered or unexported fields
}
func NewJoinRelationSet ¶
func NewJoinRelationSet(rels []uint64) *JoinRelationSet
func (*JoinRelationSet) Equal ¶
func (irs *JoinRelationSet) Equal(o Equal) bool
func (*JoinRelationSet) String ¶
func (irs *JoinRelationSet) String() string
type JoinRelationSetManager ¶
type JoinRelationSetManager struct {
// contains filtered or unexported fields
}
func NewJoinRelationSetManager ¶
func NewJoinRelationSetManager() *JoinRelationSetManager
func (*JoinRelationSetManager) String ¶
func (jrsm *JoinRelationSetManager) String() string
type LOT_JoinType ¶
type LOT_JoinType int
const ( LOT_JoinTypeCross LOT_JoinType = iota LOT_JoinTypeLeft LOT_JoinTypeInner LOT_JoinTypeSEMI LOT_JoinTypeANTI LOT_JoinTypeSINGLE LOT_JoinTypeMARK LOT_JoinTypeAntiMARK LOT_JoinTypeOUTER )
func (LOT_JoinType) String ¶
func (lojt LOT_JoinType) String() string
type LTypeCmpResult ¶
type LTypeCmpResult int
const ( IDENTICAL_TYPE LTypeCmpResult = 0 TARGET_IS_ANY LTypeCmpResult = 1 DIFFERENT_TYPES LTypeCmpResult = 2 )
func RequireCast ¶
func RequireCast(src, dst common.LType) LTypeCmpResult
type LessEqualFunc ¶
type LessEqualFunc struct {
}
func (LessEqualFunc) Register ¶
func (LessEqualFunc) Register(funcList FunctionList)
type LessFunc ¶
type LessFunc struct {
}
func (LessFunc) Register ¶
func (LessFunc) Register(funcList FunctionList)
type LikeFunc ¶
type LikeFunc struct {
}
func (LikeFunc) Register ¶
func (like LikeFunc) Register(funcList FunctionList)
type Limit ¶
type Limit struct {
// contains filtered or unexported fields
}
func (*Limit) ComputeOffset ¶
func (*Limit) HandleOffset ¶
type LimitReader ¶
type LimitReader struct {
// contains filtered or unexported fields
}
type LocalSort ¶
type LocalSort struct {
// contains filtered or unexported fields
}
func NewLocalSort ¶
func NewLocalSort(slayout *SortLayout, playout *RowLayout) *LocalSort
func (*LocalSort) ConcatenateBlocks ¶
func (ls *LocalSort) ConcatenateBlocks(rowData *RowDataCollection) *RowDataBlock
func (*LocalSort) ReOrder2 ¶
func (ls *LocalSort) ReOrder2( sd *SortedData, sortingPtr unsafe.Pointer, heap *RowDataCollection, reorderHeap bool, )
func (*LocalSort) SortInMemory ¶
func (ls *LocalSort) SortInMemory()
type LogicalOperator ¶
type LogicalOperator struct {
Typ LOT
Children []*LogicalOperator
Projects []*Expr
Index uint64 //AggNode for groupTag. others in other Nodes
Index2 uint64 //AggNode for aggTag
Database string
Table string // table
Alias string // alias
Columns []string //needed column name for SCAN
Filters []*Expr //for FILTER or AGG
BelongCtx *BindContext //for table or join
JoinTyp LOT_JoinType
OnConds []*Expr //for innor join
Aggs []*Expr
GroupBys []*Expr
OrderBys []*Expr
Limit *Expr
Offset *Expr
Stats *Stats
Outputs []*Expr
IfNotExists bool
ColDefs []*storage.ColumnDefinition //for create table
Constraints []*storage.Constraint //for create table
TableEnt *storage.CatalogEntry //for insert
TableIndex int //for insert
ExpectedTypes []common.LType //for insert
IsValuesList bool //for insert ... values
ScanTyp ScanType
Types []common.LType //for insert ... values
Names []string //for insert ... values
Values [][]*Expr //for insert ... values
ColName2Idx map[string]int
ColumnIndexMap []int //for insert
ScanInfo *ScanInfo
Counts ColumnBindCountMap `json:"-"`
ColRefToPos ColumnBindPosMap `json:"-"`
// contains filtered or unexported fields
}
func (*LogicalOperator) EstimatedCard ¶
func (lo *LogicalOperator) EstimatedCard(txn *storage.Txn) uint64
func (*LogicalOperator) String ¶
func (lo *LogicalOperator) String() string
type MaxFunc ¶
type MaxFunc struct {
}
func (MaxFunc) Register ¶
func (MaxFunc) Register(funcList FunctionList)
type MaxStateOp ¶
type MaxStateOp[T any] struct { }
func (*MaxStateOp[T]) AddValues ¶
func (as *MaxStateOp[T]) AddValues(s *State[T], cnt int)
func (*MaxStateOp[T]) Combine ¶
func (as *MaxStateOp[T]) Combine( src *State[T], target *State[T], _ *AggrInputData, top TypeOp[T])
func (*MaxStateOp[T]) Init ¶
func (as *MaxStateOp[T]) Init(s *State[T])
type MinFunc ¶
type MinFunc struct {
}
func (MinFunc) Register ¶
func (MinFunc) Register(funcList FunctionList)
type MinMaxOp ¶
func (MinMaxOp[ResultT, InputT]) ConstantOperation ¶
func (MinMaxOp[ResultT, InputT]) Finalize ¶
func (MinMaxOp[ResultT, InputT]) Finalize( s3 *State[ResultT], target *ResultT, data *AggrFinalizeData)
func (MinMaxOp[ResultT, InputT]) IgnoreNull ¶
type MinStateOp ¶
type MinStateOp[T any] struct { }
func (*MinStateOp[T]) AddValues ¶
func (as *MinStateOp[T]) AddValues(s *State[T], cnt int)
func (*MinStateOp[T]) Combine ¶
func (as *MinStateOp[T]) Combine( src *State[T], target *State[T], _ *AggrInputData, top TypeOp[T])
func (*MinStateOp[T]) Init ¶
func (as *MinStateOp[T]) Init(s *State[T])
type MultiplyFunc ¶
type MultiplyFunc struct {
}
func (MultiplyFunc) Register ¶
func (MultiplyFunc) Register(funcList FunctionList)
type NotEqualFunc ¶
type NotEqualFunc struct {
}
func (NotEqualFunc) Register ¶
func (equal NotEqualFunc) Register(funcList FunctionList)
type NotLikeFunc ¶
type NotLikeFunc struct {
}
func (NotLikeFunc) Register ¶
func (like NotLikeFunc) Register(funcList FunctionList)
type NumericTryCast ¶
type OperatorExec ¶
type OperatorExec interface {
Init() error
Execute(input, output *chunk.Chunk, state *OperatorState) (OperatorResult, error)
Close() error
}
type OperatorResult ¶
type OperatorResult int
const ( InvalidOpResult OperatorResult = 0 NeedMoreInput OperatorResult = 1 Done OperatorResult = 3 )
type OperatorState ¶
type OperatorState struct {
OprBaseState
OprScanState
OprProjectState
OprJoinState
OprAggrState
OprFilterState
OprSortState
OprLimitState
OprInsertState
OprStubState
}
type OperatorType ¶
type OperatorType int
运算符类型
const ( // 比较运算符 OpTypeCompare OperatorType = iota // 逻辑运算符 OpTypeLogical // 算术运算符 OpTypeArithmetic // 字符串运算符 OpTypeLike // 特殊运算符 OpTypeSpecial // 其它运算符 OpTypeUnknown )
func GetOperatorType ¶
func GetOperatorType(name string) OperatorType
type OprProjectState ¶
type OprProjectState struct {
// contains filtered or unexported fields
}
type OprStubState ¶
type OprStubState struct {
// contains filtered or unexported fields
}
type OrderByNullType ¶
type OrderByNullType int
const ( OBNT_INVALID OrderByNullType = iota OBNT_DEFAULT OBNT_NULLS_FIRST OBNT_NULLS_LAST )
type PDQConstants ¶
type PDQConstants struct {
// contains filtered or unexported fields
}
func NewPDQConstants ¶
func (*PDQConstants) Close ¶
func (pconst *PDQConstants) Close()
type PDQIterator ¶
type PDQIterator struct {
// contains filtered or unexported fields
}
func NewPDQIterator ¶
func NewPDQIterator(ptr unsafe.Pointer, entrySize int) *PDQIterator
type Padding ¶
type Padding struct {
// contains filtered or unexported fields
}
func (*Padding) RestorePad ¶
func (fc *Padding) RestorePad()
type PayloadScanner ¶
type PayloadScanner struct {
// contains filtered or unexported fields
}
func NewPayloadScanner ¶
func NewPayloadScanner( sortedData *SortedData, lstate *LocalSort, flush bool, ) *PayloadScanner
func (*PayloadScanner) Remaining ¶
func (scan *PayloadScanner) Remaining() int
func (*PayloadScanner) Scan ¶
func (scan *PayloadScanner) Scan(output *chunk.Chunk)
func (*PayloadScanner) Scanned ¶
func (scan *PayloadScanner) Scanned() int
type PhysicalOperator ¶
type PhysicalOperator struct {
Typ POT
Tag int //relationTag
Id int
Index uint64
Index2 uint64
Database string
Table string // table
Name string // column
Alias string // alias
JoinTyp LOT_JoinType
Outputs []*Expr
Columns []string // name of project
Projects []*Expr
Filters []*Expr
Aggs []*Expr
GroupBys []*Expr
OnConds []*Expr
OrderBys []*Expr
Limit *Expr
Offset *Expr
ChunkCount int //for stub
IfNotExists bool
ColDefs []*storage.ColumnDefinition //for create table
Constraints []*storage.Constraint //for create table
TableEnt *storage.CatalogEntry
ScanTyp ScanType
Types []common.LType //for insert ... values
ColName2Idx map[string]int
InsertTypes []common.LType //for insert ... values
//column seq no in table -> column seq no in Insert
ColumnIndexMap []int //for insert
ScanInfo *ScanInfo
Children []*PhysicalOperator
ExecStats ExecStats
// contains filtered or unexported fields
}
func (*PhysicalOperator) String ¶
func (po *PhysicalOperator) String() string
type QueryGraph ¶
type QueryGraph struct {
// contains filtered or unexported fields
}
func NewQueryGraph ¶
func NewQueryGraph() *QueryGraph
func (*QueryGraph) CreateEdge ¶
func (graph *QueryGraph) CreateEdge(left, right *JoinRelationSet, info *FilterInfo)
func (*QueryGraph) GetConnections ¶
func (graph *QueryGraph) GetConnections(node, other *JoinRelationSet) (conns []*neighborInfo)
func (*QueryGraph) GetNeighbors ¶
func (graph *QueryGraph) GetNeighbors(node *JoinRelationSet, excludeSet UnorderedSet) (ret []uint64)
func (*QueryGraph) String ¶
func (graph *QueryGraph) String() string
type RadixPartitionedHashTable ¶
type RadixPartitionedHashTable struct {
// contains filtered or unexported fields
}
func NewRadixPartitionedHashTable ¶
func NewRadixPartitionedHashTable( groupingSet GroupingSet, aggrData *GroupedAggrData, ) *RadixPartitionedHashTable
func (*RadixPartitionedHashTable) FetchAggregates ¶
func (rpht *RadixPartitionedHashTable) FetchAggregates(groups, result *chunk.Chunk)
func (*RadixPartitionedHashTable) Finalize ¶
func (rpht *RadixPartitionedHashTable) Finalize()
func (*RadixPartitionedHashTable) GetData ¶
func (rpht *RadixPartitionedHashTable) GetData(state *TupleDataScanState, output, childrenOutput *chunk.Chunk) OperatorResult
func (*RadixPartitionedHashTable) SetGroupingValues ¶
func (rpht *RadixPartitionedHashTable) SetGroupingValues()
type ReferredColumnBindMap ¶
type ReferredColumnBindMap map[ColumnBind][]*Expr
func (ReferredColumnBindMap) String ¶
func (ref ReferredColumnBindMap) String() string
type RelationAttributes ¶
type RelationAttributes struct {
// contains filtered or unexported fields
}
func NewRelationAttributes ¶
func NewRelationAttributes() *RelationAttributes
type RelationToTDom ¶
type RelationToTDom struct {
// contains filtered or unexported fields
}
func NewRelationToTDom ¶
func NewRelationToTDom(cset ColumnBindSet) *RelationToTDom
type RowDataBlock ¶
type RowDataBlock struct {
// contains filtered or unexported fields
}
func NewRowDataBlock ¶
func NewRowDataBlock(capacity int, entrySize int) *RowDataBlock
func (*RowDataBlock) Close ¶
func (block *RowDataBlock) Close()
func (*RowDataBlock) Copy ¶
func (block *RowDataBlock) Copy() *RowDataBlock
type RowDataCollection ¶
type RowDataCollection struct {
// contains filtered or unexported fields
}
func NewRowDataCollection ¶
func NewRowDataCollection(bcap int, entSize int) *RowDataCollection
func (*RowDataCollection) AppendToBlock ¶
func (cdc *RowDataCollection) AppendToBlock( block *RowDataBlock, appendEntries *[]BlockAppendEntry, remaining int, entrySizes []int) int
func (*RowDataCollection) Build ¶
func (cdc *RowDataCollection) Build( addedCnt int, keyLocs []unsafe.Pointer, entrySizes []int, sel *chunk.SelectVector)
func (*RowDataCollection) Close ¶
func (cdc *RowDataCollection) Close()
func (*RowDataCollection) CreateBlock ¶
func (cdc *RowDataCollection) CreateBlock() *RowDataBlock
type RowDataCollectionScanner ¶
type RowDataCollectionScanner struct {
// contains filtered or unexported fields
}
func NewRowDataCollectionScanner ¶
func NewRowDataCollectionScanner( row *RowDataCollection, heap *RowDataCollection, layout *RowLayout, flush bool, ) *RowDataCollectionScanner
func (*RowDataCollectionScanner) Count ¶
func (scan *RowDataCollectionScanner) Count() int
func (*RowDataCollectionScanner) Remaining ¶
func (scan *RowDataCollectionScanner) Remaining() int
func (*RowDataCollectionScanner) Reset ¶
func (scan *RowDataCollectionScanner) Reset(flush bool)
func (*RowDataCollectionScanner) Scan ¶
func (scan *RowDataCollectionScanner) Scan(output *chunk.Chunk)
func (*RowDataCollectionScanner) Scanned ¶
func (scan *RowDataCollectionScanner) Scanned() int
type RowLayout ¶
type RowLayout struct {
// contains filtered or unexported fields
}
func NewRowLayout ¶
func NewRowLayout(types []common.LType, aggrObjs []*AggrObject) *RowLayout
func (*RowLayout) AllConstant ¶
func (*RowLayout) CoumnCount ¶
func (*RowLayout) GetHeapOffset ¶
func (*RowLayout) GetOffsets ¶
type Runner ¶
func InitRunner ¶
func (*Runner) Execute ¶
func (run *Runner) Execute(input, output *chunk.Chunk, state *OperatorState) (OperatorResult, error)
type ScalarFunc ¶
func BinaryFunction ¶
func BinaryFunction[T, S, R any]( op BinaryOp[T, S, R], ) ScalarFunc
func ExecuteStandard ¶
func ExecuteStandard[T, S, R any]( op BinaryOp[T, S, R], ) ScalarFunc
func GetScalarBinaryAddFunction ¶
func GetScalarBinaryAddFunction(ptyp common.PhyType, checkOverflow bool) ScalarFunc
func GetScalarBinaryAddFunctionWithOverflowCheck ¶
func GetScalarBinaryAddFunctionWithOverflowCheck(ptyp common.PhyType) ScalarFunc
func GetScalarBinaryAddFunctionWithoutOverflowCheck ¶
func GetScalarBinaryAddFunctionWithoutOverflowCheck(ptyp common.PhyType) ScalarFunc
func GetScalarBinaryFunction ¶
func GetScalarBinaryFunction(ptyp common.PhyType, opKind string, checkOverflow bool) ScalarFunc
func GetScalarBinaryMulFunction ¶
func GetScalarBinaryMulFunction(ptyp common.PhyType, overflow bool) ScalarFunc
func GetScalarBinaryMulFunctionWithOverflow ¶
func GetScalarBinaryMulFunctionWithOverflow(ptyp common.PhyType) ScalarFunc
func GetScalarBinaryMulFunctionWithoutOverflow ¶
func GetScalarBinaryMulFunctionWithoutOverflow(ptyp common.PhyType) ScalarFunc
func GetScalarBinarySubFunction ¶
func GetScalarBinarySubFunction(ptyp common.PhyType, overflow bool) ScalarFunc
func GetScalarBinarySubFunctionWithOverflow ¶
func GetScalarBinarySubFunctionWithOverflow(ptyp common.PhyType) ScalarFunc
func GetScalarBinarySubFunctionWithoutOverflow ¶
func GetScalarBinarySubFunctionWithoutOverflow(ptyp common.PhyType) ScalarFunc
func GetScalarIntegerAddFunction ¶
func GetScalarIntegerAddFunction(ptyp common.PhyType, checkOverflow bool) ScalarFunc
func GetScalarIntegerAddFunctionWithOverflowCheck ¶
func GetScalarIntegerAddFunctionWithOverflowCheck(ptyp common.PhyType) ScalarFunc
func GetScalarIntegerAddFunctionWithoutOverflowCheck ¶
func GetScalarIntegerAddFunctionWithoutOverflowCheck(ptyp common.PhyType) ScalarFunc
func GetScalarIntegerFunction ¶
func GetScalarIntegerFunction(ptyp common.PhyType, opKind string, checkOverflow bool) ScalarFunc
func GetScalarIntegerMulFunction ¶
func GetScalarIntegerMulFunction(ptyp common.PhyType, overflow bool) ScalarFunc
func GetScalarIntegerMulFunctionWithOverflow ¶
func GetScalarIntegerMulFunctionWithOverflow(ptyp common.PhyType) ScalarFunc
func GetScalarIntegerMulFunctionWithoutOverflow ¶
func GetScalarIntegerMulFunctionWithoutOverflow(ptyp common.PhyType) ScalarFunc
func GetScalarIntegerSubFunction ¶
func GetScalarIntegerSubFunction(ptyp common.PhyType, overflow bool) ScalarFunc
func GetScalarIntegerSubFunctionWithOverflow ¶
func GetScalarIntegerSubFunctionWithOverflow(ptyp common.PhyType) ScalarFunc
func GetScalarIntegerSubFunctionWithoutOverflow ¶
func GetScalarIntegerSubFunctionWithoutOverflow(ptyp common.PhyType) ScalarFunc
func GetScalarUnaryFunction ¶
func GetScalarUnaryFunction(typ common.LType, opKind string) ScalarFunc
func GetScalarUnarySubFunction ¶
func GetScalarUnarySubFunction(typ common.LType) ScalarFunc
func TernaryExecStandard ¶
func TernaryFunction ¶
func UnaryFunction ¶
func UnaryFunction[T any, R any]( op UnaryOp[T, R]) ScalarFunc
type Scan ¶
type Scan struct {
// contains filtered or unexported fields
}
func NewScan ¶
func NewScan(ht *JoinHashTable) *Scan
func (*Scan) NextAntiJoin ¶
func (*Scan) NextInnerJoin ¶
func (*Scan) NextLeftJoin ¶
func (*Scan) NextMarkJoin ¶
func (*Scan) NextSemiJoin ¶
func (*Scan) NextSemiOrAntiJoin ¶
func (*Scan) ScanKeyMatches ¶
type ScanOption ¶
type SingleJoinRelation ¶
type SingleJoinRelation struct {
// contains filtered or unexported fields
}
type SortLayout ¶
type SortLayout struct {
// contains filtered or unexported fields
}
func NewSortLayout ¶
func NewSortLayout(orders []*Expr) *SortLayout
type SortedBlock ¶
type SortedBlock struct {
// contains filtered or unexported fields
}
func NewSortedBlock ¶
func NewSortedBlock(sortLayout *SortLayout, payloadLayout *RowLayout) *SortedBlock
type SortedData ¶
type SortedData struct {
// contains filtered or unexported fields
}
func NewSortedData ¶
func NewSortedData(typ SortedDataType, layout *RowLayout) *SortedData
func (SortedData) Count ¶
func (d SortedData) Count() int
type SortedDataType ¶
type SortedDataType int
const ( SDT_BLOB SortedDataType = 0 SDT_PAYLOAD SortedDataType = 1 )
type SourceResult ¶
type SourceResult int
const ( SrcResHaveMoreOutput SourceResult = iota SrcResDone )
type SourceType ¶
type SourceType int
const ( ThisNode SourceType = 0 LeftChild SourceType = -1 //also for one child RightChild SourceType = -2 )
type SubFunc ¶
type SubFunc struct {
}
func (SubFunc) Register ¶
func (sub SubFunc) Register(funcList FunctionList)
type Subgraph2Denominator ¶
type Subgraph2Denominator struct {
// contains filtered or unexported fields
}
func NewSubgraph2Denominator ¶
func NewSubgraph2Denominator() *Subgraph2Denominator
type SubqueryInfo ¶
type SubqueryInfo struct {
// 子查询构建和执行
SubBuilder *Builder // 子查询的构建器
SubCtx *BindContext // 子查询的绑定上下文
SubqueryTyp ET_SubqueryType // 子查询类型(标量/EXISTS/IN等)
}
子查询信息 - 用于子查询表达式
type SubstringFunc ¶
type SubstringFunc struct {
}
func (SubstringFunc) Register ¶
func (SubstringFunc) Register(funcList FunctionList)
type SumFunc ¶
type SumFunc struct {
}
func (SumFunc) Register ¶
func (SumFunc) Register(funcList FunctionList)
type SumOp ¶
func (SumOp[ResultT, InputT]) ConstantOperation ¶
func (SumOp[ResultT, InputT]) Finalize ¶
func (s SumOp[ResultT, InputT]) Finalize( s3 *State[ResultT], target *ResultT, data *AggrFinalizeData)
func (SumOp[ResultT, InputT]) IgnoreNull ¶
type SumStateOp ¶
type SumStateOp[T any] struct { }
func (SumStateOp[T]) AddValues ¶
func (SumStateOp[T]) AddValues(s *State[T], _ int)
func (SumStateOp[T]) Combine ¶
func (SumStateOp[T]) Combine( src *State[T], target *State[T], _ *AggrInputData, top TypeOp[T])
func (SumStateOp[T]) Init ¶
func (SumStateOp[T]) Init(s *State[T])
type TableFilterSet ¶
type TableFilterSet struct {
}
type TableInfo ¶
type TableInfo struct {
// 表定义和约束
TabEnt *storage.CatalogEntry // 表目录条目
ColName2Idx map[string]int // 列名到索引的映射
Constraints []*storage.Constraint // 表约束
}
表信息 - 用于表表达式
type TernaryLambdaWrapper ¶
type TernaryWrapper ¶
type TupleDataAllocator ¶
type TupleDataAllocator struct {
// contains filtered or unexported fields
}
func NewTupleDataAllocator ¶
func NewTupleDataAllocator(bufferMgr *storage.BufferManager, layout *TupleDataLayout) *TupleDataAllocator
func (*TupleDataAllocator) Build ¶
func (alloc *TupleDataAllocator) Build( segment *TupleDataSegment, pinState *TupleDataPinState, chunkState *TupleDataChunkState, appendOffset uint64, appendCount uint64, )
func (*TupleDataAllocator) BuildChunkPart ¶
func (alloc *TupleDataAllocator) BuildChunkPart( pinState *TupleDataPinState, chunkState *TupleDataChunkState, appendOffset uint64, appendCount uint64, ) *TupleDataChunkPart
BuildChunkPart allocate space for rows
func (*TupleDataAllocator) GetBaseHeapPointer ¶
func (alloc *TupleDataAllocator) GetBaseHeapPointer( pinState *TupleDataPinState, part *TupleDataChunkPart) unsafe.Pointer
func (*TupleDataAllocator) GetRowPointer ¶
func (alloc *TupleDataAllocator) GetRowPointer( pinState *TupleDataPinState, part *TupleDataChunkPart) unsafe.Pointer
func (*TupleDataAllocator) InitChunkState ¶
func (alloc *TupleDataAllocator) InitChunkState( seg *TupleDataSegment, pinState *TupleDataPinState, chunkState *TupleDataChunkState, chunkIdx int, initHeap bool, )
func (*TupleDataAllocator) InitChunkStateInternal ¶
func (alloc *TupleDataAllocator) InitChunkStateInternal( pinState *TupleDataPinState, chunkState *TupleDataChunkState, offset uint64, recompute bool, initHeapPointers bool, initHeapSizes bool, parts []*TupleDataChunkPart, )
InitChunkStateInternal evaluate the base ptr of rows
func (*TupleDataAllocator) PinHeapBlock ¶
func (alloc *TupleDataAllocator) PinHeapBlock( pinState *TupleDataPinState, part *TupleDataChunkPart) *storage.BufferHandle
PinHeapBlock let the TupleDataPinState refers to the heap block saved in the TupleDataAllocator and Pin the heap block
func (*TupleDataAllocator) PinRowBlock ¶
func (alloc *TupleDataAllocator) PinRowBlock( pinState *TupleDataPinState, part *TupleDataChunkPart) *storage.BufferHandle
PinRowBlock let the TupleDataPinState refers to the saved block saved in the TupleDataAllocator and Pin the row block
func (*TupleDataAllocator) ReleaseOrStoreHandles ¶
func (alloc *TupleDataAllocator) ReleaseOrStoreHandles( pinState *TupleDataPinState, segment *TupleDataSegment, chunk *TupleDataChunk, releaseHeap bool, )
ReleaseOrStoreHandles recycle the block unused in pin state to segment pinned blocks
func (*TupleDataAllocator) ReleaseOrStoreHandles2 ¶
func (alloc *TupleDataAllocator) ReleaseOrStoreHandles2( segment *TupleDataSegment, pinnedHandles *[]*storage.BufferHandle, handles map[uint32]*storage.BufferHandle, blockIds UnorderedSet, blocks []*TupleDataBlock, prop TupleDataPinProperties, )
type TupleDataBlock ¶
type TupleDataBlock struct {
// contains filtered or unexported fields
}
func NewTupleDataBlock ¶
func NewTupleDataBlock(bufferMgr *storage.BufferManager, cap uint64) *TupleDataBlock
func (*TupleDataBlock) Close ¶
func (block *TupleDataBlock) Close()
func (*TupleDataBlock) RemainingCapacity ¶
func (block *TupleDataBlock) RemainingCapacity() uint64
func (*TupleDataBlock) RemainingRows ¶
func (block *TupleDataBlock) RemainingRows(rowWidth uint64) uint64
type TupleDataChunk ¶
type TupleDataChunk struct {
// contains filtered or unexported fields
}
func NewTupleDataChunk ¶
func NewTupleDataChunk() *TupleDataChunk
func (*TupleDataChunk) AddPart ¶
func (chunk *TupleDataChunk) AddPart( part *TupleDataChunkPart, layout *TupleDataLayout)
type TupleDataChunkIterator ¶
type TupleDataChunkIterator struct {
// contains filtered or unexported fields
}
func NewTupleDataChunkIterator ¶
func NewTupleDataChunkIterator( collection *TupleDataCollection, prop TupleDataPinProperties, from, to int, initHeap bool, ) *TupleDataChunkIterator
func NewTupleDataChunkIterator2 ¶
func NewTupleDataChunkIterator2( collection *TupleDataCollection, prop TupleDataPinProperties, initHeap bool, ) *TupleDataChunkIterator
func (*TupleDataChunkIterator) Done ¶
func (iter *TupleDataChunkIterator) Done() bool
func (*TupleDataChunkIterator) GetChunkState ¶
func (iter *TupleDataChunkIterator) GetChunkState() *TupleDataChunkState
func (*TupleDataChunkIterator) GetCurrentChunkCount ¶
func (iter *TupleDataChunkIterator) GetCurrentChunkCount() int
func (*TupleDataChunkIterator) GetRowLocations ¶
func (iter *TupleDataChunkIterator) GetRowLocations() []unsafe.Pointer
func (*TupleDataChunkIterator) InitCurrentChunk ¶
func (iter *TupleDataChunkIterator) InitCurrentChunk()
func (*TupleDataChunkIterator) Next ¶
func (iter *TupleDataChunkIterator) Next() bool
func (*TupleDataChunkIterator) Reset ¶
func (iter *TupleDataChunkIterator) Reset()
type TupleDataChunkPart ¶
type TupleDataChunkState ¶
type TupleDataChunkState struct {
// contains filtered or unexported fields
}
func NewTupleDataChunkState ¶
func NewTupleDataChunkState(cnt, childrenOutputCnt int) *TupleDataChunkState
type TupleDataCollection ¶
type TupleDataCollection struct {
// contains filtered or unexported fields
}
func NewTupleDataCollection ¶
func NewTupleDataCollection(layout *TupleDataLayout) *TupleDataCollection
func (*TupleDataCollection) Append ¶
func (tuple *TupleDataCollection) Append( pinState *TupleDataPinState, chunkState *TupleDataChunkState, chunk *chunk.Chunk, appendSel *chunk.SelectVector, appendCount int, )
func (*TupleDataCollection) AppendUnified ¶
func (tuple *TupleDataCollection) AppendUnified( pinState *TupleDataPinState, chunkState *TupleDataChunkState, chunk *chunk.Chunk, childrenOutput *chunk.Chunk, appendSel *chunk.SelectVector, cnt int)
func (*TupleDataCollection) Build ¶
func (tuple *TupleDataCollection) Build( pinState *TupleDataPinState, chunkState *TupleDataChunkState, appendOffset uint64, appendCount uint64, )
Build allocate space for chunk may create new segment or new block
func (*TupleDataCollection) ChunkCount ¶
func (tuple *TupleDataCollection) ChunkCount() int
func (*TupleDataCollection) Count ¶
func (tuple *TupleDataCollection) Count() int
func (*TupleDataCollection) FinalizePinState ¶
func (tuple *TupleDataCollection) FinalizePinState(pinState *TupleDataPinState)
func (*TupleDataCollection) FinalizePinState2 ¶
func (tuple *TupleDataCollection) FinalizePinState2(pinState *TupleDataPinState, seg *TupleDataSegment)
func (*TupleDataCollection) Gather ¶
func (tuple *TupleDataCollection) Gather( layout *TupleDataLayout, rowLocs *chunk.Vector, scanSel *chunk.SelectVector, scanCnt int, colIds []int, result *chunk.Chunk, targetSel *chunk.SelectVector, )
func (*TupleDataCollection) InitAppend ¶
func (tuple *TupleDataCollection) InitAppend(pinState *TupleDataPinState, prop TupleDataPinProperties)
func (*TupleDataCollection) InitScan ¶
func (tuple *TupleDataCollection) InitScan(state *TupleDataScanState)
func (*TupleDataCollection) NextScanIndex ¶
func (tuple *TupleDataCollection) NextScanIndex( state *TupleDataScanState, segIdx *int, chunkIdx *int) bool
func (*TupleDataCollection) Scan ¶
func (tuple *TupleDataCollection) Scan(state *TupleDataScanState, result *chunk.Chunk) bool
func (*TupleDataCollection) ScanAtIndex ¶
func (tuple *TupleDataCollection) ScanAtIndex( pinState *TupleDataPinState, chunkState *TupleDataChunkState, colIdxs []int, segIndx, chunkIndx int, result *chunk.Chunk)
func (*TupleDataCollection) Unpin ¶
func (tuple *TupleDataCollection) Unpin()
type TupleDataLayout ¶
type TupleDataLayout struct {
// contains filtered or unexported fields
}
TupleDataLayout format:
bitmap | heap_size_offset? | data columns | aggr fields |
|------|----------------------------------|-------------|
| | | |
| | | |
bitmapWidth-----------| | | | dataWidth------------------------------| | | aggrWidth--------------------------------------------------------------| | rowWidth--------------------------------------------------------------------|
offsets: start of data columns and aggr fields
func NewTupleDataLayout ¶
func NewTupleDataLayout(types []common.LType, aggrObjs []*AggrObject, childrenOutputTypes []common.LType, align bool, needHeapOffset bool) *TupleDataLayout
type TupleDataPinProperties ¶
type TupleDataPinProperties int
const ( PIN_PRRP_INVALID TupleDataPinProperties = 0 PIN_PRRP_KEEP_PINNED TupleDataPinProperties = 1 )
type TupleDataPinState ¶
type TupleDataPinState struct {
// contains filtered or unexported fields
}
func NewTupleDataPinState ¶
func NewTupleDataPinState() *TupleDataPinState
type TupleDataScanState ¶
type TupleDataScanState struct {
// contains filtered or unexported fields
}
func NewTupleDataScanState ¶
func NewTupleDataScanState(colCnt int, prop TupleDataPinProperties) *TupleDataScanState
type TupleDataSegment ¶
type TupleDataSegment struct {
// contains filtered or unexported fields
}
func NewTupleDataSegment ¶
func NewTupleDataSegment(alloc *TupleDataAllocator) *TupleDataSegment
func (*TupleDataSegment) ChunkCount ¶
func (segment *TupleDataSegment) ChunkCount() int
func (*TupleDataSegment) Unpin ¶
func (segment *TupleDataSegment) Unpin()
type UnaryLambdaWrapper ¶
type UnaryOperatorWrapper ¶
type UnaryWrapper ¶
type UnorderedSet ¶
type ValuesListInfo ¶
type ValuesListInfo struct {
// 值列表定义
Types []common.LType // 列类型
Names []string // 列名
Values [][]*Expr // 值列表
}
值列表信息 - 用于INSERT VALUES语句
type VectorTryCastData ¶
type VectorTryCastData struct {
// contains filtered or unexported fields
}
Source Files
¶
- aggregate.go
- aggregate_exec.go
- aggregate_hash.go
- aggregate_state.go
- aggregate_types.go
- builder.go
- builder_binder.go
- builder_constants.go
- builder_ddl.go
- builder_dml.go
- builder_expr.go
- builder_logical_operator.go
- builder_physical.go
- builder_physical_operator.go
- builder_plan.go
- builder_select.go
- executor.go
- executor_aggr.go
- executor_ddl.go
- executor_filter.go
- executor_insert.go
- executor_join.go
- executor_limit.go
- executor_operator.go
- executor_order.go
- executor_scan.go
- expr.go
- expr_const.go
- expr_exec.go
- expr_format.go
- expr_rule.go
- function.go
- function_aggr.go
- function_cast.go
- function_operator_arithmetic.go
- function_operator_binary.go
- function_operator_boolean.go
- function_operator_unary.go
- function_scalar.go
- join_collection.go
- join_cross.go
- join_layout.go
- join_scan.go
- join_table.go
- join_tuple.go
- join_types.go
- optimizer_column_prune.go
- optimizer_estimate.go
- optimizer_joinorder.go
- sort.go
- sort_data.go
- sort_encoder.go
- sort_layout.go
- sort_local.go
- sort_pdq.go
- sort_radix.go
- sort_scanner.go
- sort_types.go
- util.go
- util_format.go
- util_match.go
- util_stats.go
- util_tree.go
- util_types.go
- util_vector.go