Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
Group is basic infra to store all the logically equivalent expressions for one logical operator in current context.
func NewGroup ¶
func NewGroup(prop *property.LogicalProperty) *Group
NewGroup creates a new Group with given logical prop.
func (*Group) Insert ¶
func (g *Group) Insert(e *GroupExpression) bool
Insert adds a GroupExpression to the Group.
type GroupExpression ¶
type GroupExpression struct {
// contains filtered or unexported fields
}
GroupExpression is a single expression from the equivalent list classes inside a group. it is a node in the expression tree, while it takes groups as inputs. This kind of loose coupling between Group and GroupExpression is the key to the success of the memory compact of representing a forest.
func NewGroupExpression ¶
func NewGroupExpression(lp base.LogicalPlan, inputs []*Group) *GroupExpression
NewGroupExpression creates a new GroupExpression with the given logical plan and children.
func (*GroupExpression) Equals ¶
func (e *GroupExpression) Equals(other any) bool
Equals implements the Equals interface.
func (*GroupExpression) Hash64 ¶
func (e *GroupExpression) Hash64(h base2.Hasher)
Hash64 implements the Hash64 interface.
func (*GroupExpression) Init ¶
func (e *GroupExpression) Init(h base2.Hasher)
Init initializes the GroupExpression with the given group and hasher.
func (*GroupExpression) Sum64 ¶
func (e *GroupExpression) Sum64() uint64
Sum64 returns the cached hash64 of the GroupExpression.
type GroupIDGenerator ¶
type GroupIDGenerator struct {
// contains filtered or unexported fields
}
GroupIDGenerator is used to generate group id.
func (*GroupIDGenerator) NextGroupID ¶
func (gi *GroupIDGenerator) NextGroupID() GroupID
NextGroupID generates the next group id. It is not thread-safe, since memo optimizing is also in one thread.
type Memo ¶
type Memo struct {
// contains filtered or unexported fields
}
Memo is the main structure of the memo package.
func (*Memo) CopyIn ¶
func (m *Memo) CopyIn(target *Group, lp base.LogicalPlan) (*GroupExpression, bool)
CopyIn copies a logical plan into the memo with format as GroupExpression.