File tree Expand file tree Collapse file tree 2 files changed +35
-18
lines changed
Expand file tree Collapse file tree 2 files changed +35
-18
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ Copyright 2018 The Vitess Authors.
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+ */
16+
17+ package planbuilder
18+
19+ // planBuilder is the top level type for building plans.
20+ // It contains the current builder tree, the symtab and
21+ // the jointab. It can create transient planBuilders due
22+ // to the recursive nature of SQL.
23+ type planBuilder struct {
24+ vschema ContextVSchema
25+ jt * jointab
26+ bldr builder
27+ st * symtab
28+ }
29+
30+ func newPlanBuilder (vschema ContextVSchema , jt * jointab ) * planBuilder {
31+ return & planBuilder {
32+ vschema : vschema ,
33+ jt : jt ,
34+ }
35+ }
Original file line number Diff line number Diff line change @@ -24,24 +24,6 @@ import (
2424 "vitess.io/vitess/go/vt/vtgate/engine"
2525)
2626
27- // planBuilder is the top level type for building plans.
28- // It contains the current builder tree, the symtab and
29- // the jointab. It can create transient planBuilders due
30- // to the recursive nature of SQL.
31- type planBuilder struct {
32- vschema ContextVSchema
33- jt * jointab
34- bldr builder
35- st * symtab
36- }
37-
38- func newPlanBuilder (vschema ContextVSchema , jt * jointab ) * planBuilder {
39- return & planBuilder {
40- vschema : vschema ,
41- jt : jt ,
42- }
43- }
44-
4527// buildSelectPlan is the new function to build a Select plan.
4628func buildSelectPlan (sel * sqlparser.Select , vschema ContextVSchema ) (primitive engine.Primitive , err error ) {
4729 pb := newPlanBuilder (vschema , newJointab (sqlparser .GetBindvars (sel )))
You can’t perform that action at this time.
0 commit comments