message

package
v0.0.0-debug-20260702 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RuntimeFilter_IN             = 0
	RuntimeFilter_BITMAP         = 1
	RuntimeFilter_MIN_MAX        = 2
	RuntimeFilter_BINARY_FUSE    = 3
	RuntimeFilter_UNIQUEJOINKEYS = 4
	RuntimeFilter_PASS           = 100
	RuntimeFilter_DROP           = 101
)
View Source
const ALLCN = "ALLCN"
View Source
const CURRENTCN = "CURRENTCN"

Variables

This section is empty.

Functions

func FinalizeJoinMapMessage

func FinalizeJoinMapMessage(mb *MessageBoard, tag int32, isShuffle bool, shuffleIdx int32, sendMapSucceed bool)

func FinalizeRuntimeFilter

func FinalizeRuntimeFilter(m *plan.RuntimeFilterSpec, sendSucceed bool, mb *MessageBoard)

func MatchAddress

func MatchAddress(m Message, raddr *MessageAddress) bool

func SendMessage

func SendMessage(m Message, mb *MessageBoard)

func SendRuntimeFilter

func SendRuntimeFilter(rt RuntimeFilterMessage, m *plan.RuntimeFilterSpec, mb *MessageBoard)

Types

type GroupSels

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

func (*GroupSels) Finalize

func (sels *GroupSels) Finalize(groupCount int, inputRowCount int, mp *mpool.MPool) error

func (*GroupSels) Free

func (sels *GroupSels) Free(mp *mpool.MPool)

func (*GroupSels) Get

func (sels *GroupSels) Get(k int32) []int32

func (*GroupSels) Init

func (sels *GroupSels) Init(n int, mp *mpool.MPool) error

func (*GroupSels) Insert

func (sels *GroupSels) Insert(k, v int32)

func (*GroupSels) Size

func (sels *GroupSels) Size() int64

type JoinMap

type JoinMap struct {

	// spill support
	Spilled       bool
	SpillBuildFds []*os.File // anonymous build-side file descriptors
	// contains filtered or unexported fields
}

JoinMap is used for join

func NewJoinMap

func NewJoinMap(sels GroupSels, ihm *hashmap.IntHashMap, shm *hashmap.StrHashMap, delRows *bitmap.Bitmap, batches []*batch.Batch, m *mpool.MPool) *JoinMap

func ReceiveJoinMap

func ReceiveJoinMap(tag int32, isShuffle bool, shuffleIdx int32, mb *MessageBoard, ctx context.Context) (*JoinMap, error)

func (*JoinMap) Free

func (jm *JoinMap) Free()

func (*JoinMap) FreeMemory

func (jm *JoinMap) FreeMemory()

func (*JoinMap) GetBatches

func (jm *JoinMap) GetBatches() []*batch.Batch

func (*JoinMap) GetGroupCount

func (jm *JoinMap) GetGroupCount() uint64

func (*JoinMap) GetRefCount

func (jm *JoinMap) GetRefCount() int64

func (*JoinMap) GetRowCount

func (jm *JoinMap) GetRowCount() int64

func (*JoinMap) GetSels

func (jm *JoinMap) GetSels(k uint64) []int32

func (*JoinMap) HashOnUnique

func (jm *JoinMap) HashOnUnique() bool

func (*JoinMap) IncRef

func (jm *JoinMap) IncRef(cnt int32)

func (*JoinMap) IsDeleted

func (jm *JoinMap) IsDeleted(row uint64) bool

func (*JoinMap) IsSpilled

func (jm *JoinMap) IsSpilled() bool

func (*JoinMap) IsValid

func (jm *JoinMap) IsValid() bool

func (*JoinMap) NewIterator

func (jm *JoinMap) NewIterator() hashmap.Iterator

func (*JoinMap) PreAlloc

func (jm *JoinMap) PreAlloc(n uint64) error

func (*JoinMap) PushedRuntimeFilterIn

func (jm *JoinMap) PushedRuntimeFilterIn() bool

func (*JoinMap) SetPushedRuntimeFilterIn

func (jm *JoinMap) SetPushedRuntimeFilterIn(b bool)

func (*JoinMap) SetRowCount

func (jm *JoinMap) SetRowCount(cnt int64)

func (*JoinMap) Size

func (jm *JoinMap) Size() int64

func (*JoinMap) TakeSpillBuildFds

func (jm *JoinMap) TakeSpillBuildFds() []*os.File

TakeSpillBuildFds transfers ownership of anonymous build-side file descriptors from the JoinMap to the caller. After this call the JoinMap no longer owns the fds; FreeMemory will not close them.

type JoinMapMsg

type JoinMapMsg struct {
	JoinMapPtr *JoinMap
	IsShuffle  bool
	ShuffleIdx int32
	Tag        int32
	Spilled    bool
}

func (JoinMapMsg) DebugString

func (t JoinMapMsg) DebugString() string

func (JoinMapMsg) Deserialize

func (t JoinMapMsg) Deserialize([]byte) Message

func (JoinMapMsg) Destroy

func (t JoinMapMsg) Destroy()

func (JoinMapMsg) GetMsgTag

func (t JoinMapMsg) GetMsgTag() int32

func (JoinMapMsg) GetReceiverAddr

func (t JoinMapMsg) GetReceiverAddr() MessageAddress

func (JoinMapMsg) NeedBlock

func (t JoinMapMsg) NeedBlock() bool

func (JoinMapMsg) Serialize

func (t JoinMapMsg) Serialize() []byte

type Message

type Message interface {
	Serialize() []byte
	Deserialize([]byte) Message
	NeedBlock() bool
	GetMsgTag() int32
	GetReceiverAddr() MessageAddress
	DebugString() string
	Destroy()
}

type MessageAddress

type MessageAddress struct {
	CnAddr     string
	OperatorID int32
	ParallelID int32
}

func AddrBroadCastOnALLCN

func AddrBroadCastOnALLCN() MessageAddress

func AddrBroadCastOnCurrentCN

func AddrBroadCastOnCurrentCN() MessageAddress

type MessageBoard

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

func NewMessageBoard

func NewMessageBoard() *MessageBoard

func (*MessageBoard) BeforeRunonce

func (m *MessageBoard) BeforeRunonce()

func (*MessageBoard) DebugString

func (m *MessageBoard) DebugString() string

func (*MessageBoard) Reset

func (m *MessageBoard) Reset() *MessageBoard

func (*MessageBoard) SetMultiCN

func (m *MessageBoard) SetMultiCN(center *MessageCenter, stmtId uuid.UUID) *MessageBoard

type MessageCenter

type MessageCenter struct {
	StmtIDToBoard map[uuid.UUID]*MessageBoard
	RwMutex       *sync.Mutex
}

type MessageReceiver

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

func NewMessageReceiver

func NewMessageReceiver(tags []int32, addr MessageAddress, mb *MessageBoard) *MessageReceiver

func (*MessageReceiver) ReceiveMessage

func (mr *MessageReceiver) ReceiveMessage(needBlock bool, ctx context.Context) ([]Message, bool, error)

type MsgType

type MsgType int32
const (
	MsgTopValue      MsgType = 0
	MsgPipelineStart MsgType = 1
	MsgPipelineStop  MsgType = 2
	MsgRuntimeFilter MsgType = 3
	MsgJoinMap       MsgType = 4
	MaxMessage       MsgType = 1024
)

func (MsgType) MessageName

func (m MsgType) MessageName() string

type RuntimeFilterMessage

type RuntimeFilterMessage struct {
	Tag  int32
	Typ  int32
	Card int32
	Data []byte
}

func (RuntimeFilterMessage) DebugString

func (rt RuntimeFilterMessage) DebugString() string

func (RuntimeFilterMessage) Deserialize

func (rt RuntimeFilterMessage) Deserialize([]byte) Message

func (RuntimeFilterMessage) Destroy

func (rt RuntimeFilterMessage) Destroy()

func (RuntimeFilterMessage) GetMsgTag

func (rt RuntimeFilterMessage) GetMsgTag() int32

func (RuntimeFilterMessage) GetReceiverAddr

func (rt RuntimeFilterMessage) GetReceiverAddr() MessageAddress

func (RuntimeFilterMessage) NeedBlock

func (rt RuntimeFilterMessage) NeedBlock() bool

func (RuntimeFilterMessage) Serialize

func (rt RuntimeFilterMessage) Serialize() []byte

type TopValueMessage

type TopValueMessage struct {
	TopValueZM objectio.ZoneMap
	Tag        int32
}

func (TopValueMessage) DebugString

func (t TopValueMessage) DebugString() string

func (TopValueMessage) Deserialize

func (t TopValueMessage) Deserialize([]byte) Message

func (TopValueMessage) Destroy

func (t TopValueMessage) Destroy()

func (TopValueMessage) GetMsgTag

func (t TopValueMessage) GetMsgTag() int32

func (TopValueMessage) GetReceiverAddr

func (t TopValueMessage) GetReceiverAddr() MessageAddress

func (TopValueMessage) NeedBlock

func (t TopValueMessage) NeedBlock() bool

func (TopValueMessage) Serialize

func (t TopValueMessage) Serialize() []byte

Jump to

Keyboard shortcuts

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