-
Notifications
You must be signed in to change notification settings - Fork 218
Expand file tree
/
Copy pathjoin_plan.go
More file actions
67 lines (54 loc) · 1.09 KB
/
join_plan.go
File metadata and controls
67 lines (54 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
* Radon
*
* Copyright 2018 The Radon Authors.
* Code is licensed under the GPLv3.
*
*/
package planner
import (
"github.com/xelabs/go-mysqlstack/sqlparser"
"github.com/xelabs/go-mysqlstack/xlog"
)
var (
_ Plan = &JoinPlan{}
)
// JoinPlan represents join plan.
type JoinPlan struct {
log *xlog.Log
node *sqlparser.Select
// type
typ PlanType
}
// NewJoinPlan used to create JoinPlan.
func NewJoinPlan(log *xlog.Log, node *sqlparser.Select) *JoinPlan {
return &JoinPlan{
log: log,
node: node,
typ: PlanTypeJoin,
}
}
// analyze used to check the join is at the support level.
func (p *JoinPlan) analyze() error {
return nil
}
// Build used to build distributed querys.
func (p *JoinPlan) Build() error {
return p.analyze()
}
// Type returns the type of the plan.
func (p *JoinPlan) Type() PlanType {
return p.typ
}
// JSON returns the plan info.
func (p *JoinPlan) JSON() string {
return ""
}
// Children returns the children of the plan.
func (p *JoinPlan) Children() *PlanTree {
return nil
}
// Size returns the memory size.
func (p *JoinPlan) Size() int {
return 0
}