Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Operand ¶
type Operand int
Operand is the node of a pattern tree, it represents a logical expression operator. Different from logical plan operator which holds the full information about an expression operator, Operand only stores the type information. An Operand may correspond to a concrete logical plan operator, or it can has special meaning, e.g, a placeholder for any logical plan operator.
const ( // OperandAny is a placeholder for any Operand. OperandAny Operand = iota // OperandJoin for LogicalJoin. OperandJoin // OperandAggregation for LogicalAggregation. OperandAggregation // OperandProjection for LogicalProjection. OperandProjection // OperandSelection for LogicalSelection. OperandSelection // OperandApply for LogicalApply. OperandApply // OperandMaxOneRow for LogicalMaxOneRow. OperandMaxOneRow // OperandTableDual for LogicalTableDual. OperandTableDual // OperandDataSource for DataSource. OperandDataSource // OperandUnionScan for LogicalUnionScan. OperandUnionScan // OperandUnionAll for LogicalUnionAll. OperandUnionAll // OperandSort for LogicalSort. OperandSort // OperandTopN for LogicalTopN. OperandTopN // OperandLock for LogicalLock. OperandLock // OperandLimit for LogicalLimit. OperandLimit // OperandUnsupported is upper bound of defined Operand yet. OperandUnsupported )
func GetOperand ¶
func GetOperand(p plannercore.LogicalPlan) (Operand, error)
GetOperand maps logical plan operator to Operand.
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
Pattern defines the match pattern for a rule. It describes a piece of logical expression. It's a tree-like structure and each node in the tree is an Operand.
func BuildPattern ¶
BuildPattern builds a Pattern from Operand and child Patterns. Used in GetPattern() of Transformation interface to generate a Pattern.