Documentation
¶
Index ¶
- type AbstractPlanNode
- type AggregateKey
- type AggregateValue
- type AggregationPlanNode
- func (p *AggregationPlanNode) GetAggregateAt(idx uint32) expression.Expression
- func (p *AggregationPlanNode) GetAggregateTypes() []AggregationType
- func (p *AggregationPlanNode) GetAggregates() []expression.Expression
- func (p *AggregationPlanNode) GetChildAt(childIndex uint32) Plan
- func (p *AggregationPlanNode) GetChildPlan() Plan
- func (p *AggregationPlanNode) GetChildren() []Plan
- func (p *AggregationPlanNode) GetGroupByAt(idx uint32) expression.Expression
- func (p *AggregationPlanNode) GetGroupBys() []expression.Expression
- func (p *AggregationPlanNode) GetHaving() expression.Expression
- func (p *AggregationPlanNode) GetTableOID() uint32
- func (p *AggregationPlanNode) GetType() PlanType
- type AggregationType
- type DeletePlanNode
- type FilterPlanNode
- type HashJoinPlanNode
- func (p *HashJoinPlanNode) GetLeftKeyAt(idx uint32) expression.Expression
- func (p *HashJoinPlanNode) GetLeftKeys() []expression.Expression
- func (p *HashJoinPlanNode) GetLeftPlan() Plan
- func (p *HashJoinPlanNode) GetRightKeyAt(idx uint32) expression.Expression
- func (p *HashJoinPlanNode) GetRightKeys() []expression.Expression
- func (p *HashJoinPlanNode) GetRightPlan() Plan
- func (p *HashJoinPlanNode) GetTableOID() uint32
- func (p *HashJoinPlanNode) GetType() PlanType
- func (p *HashJoinPlanNode) OnPredicate() expression.Expression
- type InsertPlanNode
- type LimitPlanNode
- type OrderbyPlanNode
- func (p *OrderbyPlanNode) GetChildAt(childIndex uint32) Plan
- func (p *OrderbyPlanNode) GetChildPlan() Plan
- func (p *OrderbyPlanNode) GetChildren() []Plan
- func (p *OrderbyPlanNode) GetColIdxAt(idx uint32) int
- func (p *OrderbyPlanNode) GetColIdxs() []int
- func (p *OrderbyPlanNode) GetOrderbyTypes() []OrderbyType
- func (p *OrderbyPlanNode) GetTableOID() uint32
- func (p *OrderbyPlanNode) GetType() PlanType
- type OrderbyType
- type Plan
- func NewDeletePlanNode(child Plan) Plan
- func NewFilterPlanNode(child Plan, selectColumns *schema.Schema, predicate expression.Expression) Plan
- func NewInsertPlanNode(rawValues [][]types.Value, oid uint32) Plan
- func NewLimitPlanNode(child Plan, limit uint32, offset uint32) Plan
- func NewPointScanWithIndexPlanNode(schema *schema.Schema, predicate *expression.Comparison, tableOID uint32) Plan
- func NewRangeScanWithIndexPlanNode(schema *schema.Schema, tableOID uint32, colIdx int32, ...) Plan
- func NewSeqScanPlanNode(schema *schema.Schema, predicate expression.Expression, tableOID uint32) Plan
- func NewUpdatePlanNode(rawValues []types.Value, update_col_idxs []int, child Plan) Plan
- type PlanType
- type PointScanWithIndexPlanNode
- type RangeScanWithIndexPlanNode
- func (p *RangeScanWithIndexPlanNode) GetColIdx() int32
- func (p *RangeScanWithIndexPlanNode) GetEndRange() *types.Value
- func (p *RangeScanWithIndexPlanNode) GetPredicate() expression.Expression
- func (p *RangeScanWithIndexPlanNode) GetStartRange() *types.Value
- func (p *RangeScanWithIndexPlanNode) GetTableOID() uint32
- func (p *RangeScanWithIndexPlanNode) GetType() PlanType
- type SeqScanPlanNode
- type UpdatePlanNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbstractPlanNode ¶
type AbstractPlanNode struct {
// contains filtered or unexported fields
}
*
- AbstractPlanNode represents all the possible types of plan nodes in our system.
- Plan nodes are modeled as trees, so each plan node can have a variable number of children.
- Per the Volcano model, the plan node receives the tuples of its children.
- The ordering of the children may matter.
func (*AbstractPlanNode) GetChildAt ¶
func (p *AbstractPlanNode) GetChildAt(childIndex uint32) Plan
func (*AbstractPlanNode) GetChildren ¶
func (p *AbstractPlanNode) GetChildren() []Plan
func (*AbstractPlanNode) OutputSchema ¶
func (p *AbstractPlanNode) OutputSchema() *schema.Schema
type AggregateKey ¶
type AggregateValue ¶
type AggregationPlanNode ¶
type AggregationPlanNode struct {
*AbstractPlanNode
// contains filtered or unexported fields
}
*
- AggregationPlanNode represents the various SQL aggregation functions.
- For example, COUNT(), SUM(), MIN() and MAX().
- To simplfiy this project, AggregationPlanNode must always have exactly one child.
func NewAggregationPlanNode ¶
func NewAggregationPlanNode(output_schema *schema.Schema, child Plan, having expression.Expression, group_bys []expression.Expression, aggregates []expression.Expression, agg_types []AggregationType) *AggregationPlanNode
*
- Creates a new AggregationPlanNode.
- @param output_schema the output format of this plan node
- @param child the child plan to aggregate data over
- @param having the having clause of the aggregation
- @param group_bys the group by clause of the aggregation
- @param aggregates the expressions that we are aggregating
- @param agg_types the types that we are aggregating
func (*AggregationPlanNode) GetAggregateAt ¶
func (p *AggregationPlanNode) GetAggregateAt(idx uint32) expression.Expression
* @return the idx'th aggregate expression
func (*AggregationPlanNode) GetAggregateTypes ¶
func (p *AggregationPlanNode) GetAggregateTypes() []AggregationType
* @return the aggregate types
func (*AggregationPlanNode) GetAggregates ¶
func (p *AggregationPlanNode) GetAggregates() []expression.Expression
* @return the aggregate expressions
func (*AggregationPlanNode) GetChildAt ¶
func (p *AggregationPlanNode) GetChildAt(childIndex uint32) Plan
func (*AggregationPlanNode) GetChildPlan ¶
func (p *AggregationPlanNode) GetChildPlan() Plan
* @return the child of this aggregation plan node
func (*AggregationPlanNode) GetChildren ¶
func (p *AggregationPlanNode) GetChildren() []Plan
func (*AggregationPlanNode) GetGroupByAt ¶
func (p *AggregationPlanNode) GetGroupByAt(idx uint32) expression.Expression
* @return the idx'th group by expression
func (*AggregationPlanNode) GetGroupBys ¶
func (p *AggregationPlanNode) GetGroupBys() []expression.Expression
* @return the group by expressions
func (*AggregationPlanNode) GetHaving ¶
func (p *AggregationPlanNode) GetHaving() expression.Expression
* @return the having clause
func (*AggregationPlanNode) GetTableOID ¶ added in v0.0.2
func (p *AggregationPlanNode) GetTableOID() uint32
func (*AggregationPlanNode) GetType ¶
func (p *AggregationPlanNode) GetType() PlanType
type AggregationType ¶
type AggregationType int32
/** AggregationType enumerates all the possible aggregation functions in our system. */
const ( COUNT_AGGREGATE AggregationType = iota SUM_AGGREGATE MIN_AGGREGATE MAX_AGGREGATE )
* The type of the log record.
type DeletePlanNode ¶
type DeletePlanNode struct {
*AbstractPlanNode
}
*
- DeletePlanNode identifies a table and conditions specify record to be deleted.
func (*DeletePlanNode) GetTableOID ¶
func (p *DeletePlanNode) GetTableOID() uint32
func (*DeletePlanNode) GetType ¶
func (p *DeletePlanNode) GetType() PlanType
type FilterPlanNode ¶
type FilterPlanNode struct {
*AbstractPlanNode
// contains filtered or unexported fields
}
func (*FilterPlanNode) GetPredicate ¶
func (p *FilterPlanNode) GetPredicate() expression.Expression
func (*FilterPlanNode) GetSelectColumns ¶
func (p *FilterPlanNode) GetSelectColumns() *schema.Schema
func (*FilterPlanNode) GetTableOID ¶ added in v0.0.2
func (p *FilterPlanNode) GetTableOID() uint32
func (*FilterPlanNode) GetType ¶
func (p *FilterPlanNode) GetType() PlanType
type HashJoinPlanNode ¶
type HashJoinPlanNode struct {
*AbstractPlanNode
// contains filtered or unexported fields
}
*
- HashJoinPlanNode is used to represent performing a hash join between two children plan nodes.
- By convention, the left child (index 0) is used to build the hash table,
- and the right child (index 1) is used in probing the hash table.
func NewHashJoinPlanNode ¶
func NewHashJoinPlanNode(output_schema *schema.Schema, children []Plan, onPredicate expression.Expression, left_hash_keys []expression.Expression, right_hash_keys []expression.Expression) *HashJoinPlanNode
func (*HashJoinPlanNode) GetLeftKeyAt ¶
func (p *HashJoinPlanNode) GetLeftKeyAt(idx uint32) expression.Expression
* @return the left key at the given index
func (*HashJoinPlanNode) GetLeftKeys ¶
func (p *HashJoinPlanNode) GetLeftKeys() []expression.Expression
* @return the left keys
func (*HashJoinPlanNode) GetLeftPlan ¶
func (p *HashJoinPlanNode) GetLeftPlan() Plan
* @return the left plan node of the hash join, by convention this is used to build the table
func (*HashJoinPlanNode) GetRightKeyAt ¶
func (p *HashJoinPlanNode) GetRightKeyAt(idx uint32) expression.Expression
* @return the right key at the given index
func (*HashJoinPlanNode) GetRightKeys ¶
func (p *HashJoinPlanNode) GetRightKeys() []expression.Expression
* @return the right keys
func (*HashJoinPlanNode) GetRightPlan ¶
func (p *HashJoinPlanNode) GetRightPlan() Plan
* @return the right plan node of the hash join
func (*HashJoinPlanNode) GetTableOID ¶ added in v0.0.2
func (p *HashJoinPlanNode) GetTableOID() uint32
can not be used
func (*HashJoinPlanNode) GetType ¶
func (p *HashJoinPlanNode) GetType() PlanType
func (*HashJoinPlanNode) OnPredicate ¶
func (p *HashJoinPlanNode) OnPredicate() expression.Expression
* @return the onPredicate to be used in the hash join
type InsertPlanNode ¶
type InsertPlanNode struct {
*AbstractPlanNode
// contains filtered or unexported fields
}
*
- InsertPlanNode identifies a table that should be inserted into.
- The values to be inserted are either embedded into the InsertPlanNode itself, i.e. a "raw insert",
- or will come from the child of the InsertPlanNode. To simplify the assignment, InsertPlanNode has at most one child.
func (*InsertPlanNode) GetRawValues ¶
func (p *InsertPlanNode) GetRawValues() [][]types.Value
GetRawValues returns the raw values to be inserted
func (*InsertPlanNode) GetTableOID ¶
func (p *InsertPlanNode) GetTableOID() uint32
GetTableOID returns the identifier of the table that should be inserted into
func (*InsertPlanNode) GetType ¶
func (p *InsertPlanNode) GetType() PlanType
type LimitPlanNode ¶
type LimitPlanNode struct {
*AbstractPlanNode
// contains filtered or unexported fields
}
func (*LimitPlanNode) GetLimit ¶
func (p *LimitPlanNode) GetLimit() uint32
func (*LimitPlanNode) GetOffset ¶
func (p *LimitPlanNode) GetOffset() uint32
func (*LimitPlanNode) GetTableOID ¶ added in v0.0.2
func (p *LimitPlanNode) GetTableOID() uint32
func (*LimitPlanNode) GetType ¶
func (p *LimitPlanNode) GetType() PlanType
type OrderbyPlanNode ¶
type OrderbyPlanNode struct {
*AbstractPlanNode
// contains filtered or unexported fields
}
*
- OrderbyPlanNode represents the ORDER BY clause of SQL.
func NewOrderbyPlanNode ¶
func NewOrderbyPlanNode(child_schema *schema.Schema, child Plan, col_idxs []int, order_types []OrderbyType) *OrderbyPlanNode
*
- Creates a new OrderbyPlanNode.
- @param output_schema the output format of this plan node. it is same with output schema of child
- @param child the child plan to sort data over
- @param col_idxs the specified columns idx at ORDER BY clause
- @param order_types the order types of sorting with specifed columns
func (*OrderbyPlanNode) GetChildAt ¶
func (p *OrderbyPlanNode) GetChildAt(childIndex uint32) Plan
func (*OrderbyPlanNode) GetChildPlan ¶
func (p *OrderbyPlanNode) GetChildPlan() Plan
* @return the child of this aggregation plan node
func (*OrderbyPlanNode) GetChildren ¶
func (p *OrderbyPlanNode) GetChildren() []Plan
func (*OrderbyPlanNode) GetColIdxAt ¶
func (p *OrderbyPlanNode) GetColIdxAt(idx uint32) int
* @return the idx'th group by expression
func (*OrderbyPlanNode) GetColIdxs ¶
func (p *OrderbyPlanNode) GetColIdxs() []int
* @return column indexes to deside sort order
func (*OrderbyPlanNode) GetOrderbyTypes ¶
func (p *OrderbyPlanNode) GetOrderbyTypes() []OrderbyType
* @return the Order type ASC or DESC
func (*OrderbyPlanNode) GetTableOID ¶ added in v0.0.2
func (p *OrderbyPlanNode) GetTableOID() uint32
func (*OrderbyPlanNode) GetType ¶
func (p *OrderbyPlanNode) GetType() PlanType
type OrderbyType ¶
type OrderbyType int32
/** OrderbyType enumerates all the possible aggregation functions in our system. */
const ( ASC OrderbyType = iota DESC )
* The type of the sort order.
type Plan ¶
type Plan interface {
OutputSchema() *schema.Schema
GetChildAt(childIndex uint32) Plan
GetChildren() []Plan
GetType() PlanType
GetTableOID() uint32
}
func NewDeletePlanNode ¶
func NewDeletePlanNode(predicate expression.Expression, oid uint32) Plan {
func NewFilterPlanNode ¶
func NewFilterPlanNode(child Plan, selectColumns *schema.Schema, predicate expression.Expression) Plan
func NewInsertPlanNode ¶
NewInsertPlanNode creates a new insert plan node for inserting raw values
func NewPointScanWithIndexPlanNode ¶ added in v0.0.2
func NewPointScanWithIndexPlanNode(schema *schema.Schema, predicate *expression.Comparison, tableOID uint32) Plan
func NewRangeScanWithIndexPlanNode ¶ added in v0.0.2
func NewSeqScanPlanNode ¶
func NewSeqScanPlanNode(schema *schema.Schema, predicate expression.Expression, tableOID uint32) Plan
func NewUpdatePlanNode ¶
if you update all column, you can specify nil to update_col_idxs. then all data of existed tuple is replaced with rawValues if you want update specifed columns only, you should specify columns with update_col_idxs and pass rawValues of all columns defined in schema. but not update target column value can be dummy value! func NewUpdatePlanNode(rawValues []types.Value, update_col_idxs []int, predicate expression.Expression, oid uint32) Plan {
type PointScanWithIndexPlanNode ¶ added in v0.0.2
type PointScanWithIndexPlanNode struct {
*AbstractPlanNode
// contains filtered or unexported fields
}
*
- PointScanWithIndexPlanNode use hash index to filter rows matches predicate.
func (*PointScanWithIndexPlanNode) GetPredicate ¶ added in v0.0.2
func (p *PointScanWithIndexPlanNode) GetPredicate() *expression.Comparison
func (*PointScanWithIndexPlanNode) GetTableOID ¶ added in v0.0.2
func (p *PointScanWithIndexPlanNode) GetTableOID() uint32
func (*PointScanWithIndexPlanNode) GetType ¶ added in v0.0.2
func (p *PointScanWithIndexPlanNode) GetType() PlanType
type RangeScanWithIndexPlanNode ¶ added in v0.0.2
type RangeScanWithIndexPlanNode struct {
*AbstractPlanNode
// contains filtered or unexported fields
}
*
- RangeScanWithIndexPlanNode use hash index to filter rows matches predicate.
func (*RangeScanWithIndexPlanNode) GetColIdx ¶ added in v0.0.2
func (p *RangeScanWithIndexPlanNode) GetColIdx() int32
func (*RangeScanWithIndexPlanNode) GetEndRange ¶ added in v0.0.2
func (p *RangeScanWithIndexPlanNode) GetEndRange() *types.Value
func (*RangeScanWithIndexPlanNode) GetPredicate ¶ added in v0.0.2
func (p *RangeScanWithIndexPlanNode) GetPredicate() expression.Expression
func (*RangeScanWithIndexPlanNode) GetStartRange ¶ added in v0.0.2
func (p *RangeScanWithIndexPlanNode) GetStartRange() *types.Value
func (*RangeScanWithIndexPlanNode) GetTableOID ¶ added in v0.0.2
func (p *RangeScanWithIndexPlanNode) GetTableOID() uint32
func (*RangeScanWithIndexPlanNode) GetType ¶ added in v0.0.2
func (p *RangeScanWithIndexPlanNode) GetType() PlanType
type SeqScanPlanNode ¶
type SeqScanPlanNode struct {
*AbstractPlanNode
// contains filtered or unexported fields
}
*
- SeqScanPlanNode identifies a table that should be scanned with an optional predicate.
func (*SeqScanPlanNode) GetPredicate ¶
func (p *SeqScanPlanNode) GetPredicate() expression.Expression
func (*SeqScanPlanNode) GetTableOID ¶
func (p *SeqScanPlanNode) GetTableOID() uint32
func (*SeqScanPlanNode) GetType ¶
func (p *SeqScanPlanNode) GetType() PlanType
type UpdatePlanNode ¶
type UpdatePlanNode struct {
*AbstractPlanNode
// contains filtered or unexported fields
}
*
- UpdatePlanNode identifies a table and conditions specify record to be deleted.
func (*UpdatePlanNode) GetRawValues ¶
func (p *UpdatePlanNode) GetRawValues() []types.Value
GetRawValues returns the raw values to be overwrite data
func (*UpdatePlanNode) GetTableOID ¶
func (p *UpdatePlanNode) GetTableOID() uint32
func (*UpdatePlanNode) GetType ¶
func (p *UpdatePlanNode) GetType() PlanType
func (*UpdatePlanNode) GetUpdateColIdxs ¶
func (p *UpdatePlanNode) GetUpdateColIdxs() []int