@@ -15,6 +15,7 @@ import (
1515
1616type PlanBuilderInput interface {
1717 Clone () PlanBuilderInput
18+ GetChildren () []PlanBuilderInput
1819 Refocus (sqlparser.SQLNode ) PlanBuilderInput
1920 GetAliasedTables () parserutil.TableAliasMap
2021 GetAnnotatedAST () annotatedast.AnnotatedAst
@@ -46,6 +47,7 @@ type PlanBuilderInput interface {
4647 GetUpdate () (* sqlparser.Update , bool )
4748 GetUse () (* sqlparser.Use , bool )
4849 GetSet () (* sqlparser.Set , bool )
50+ GetExplain () (* sqlparser.Explain , bool )
4951 IsTccSetAheadOfTime () bool
5052 SetIsTccSetAheadOfTime (bool )
5153 SetPrepStmtOffset (int )
@@ -61,6 +63,7 @@ type PlanBuilderInput interface {
6163 IsReadOnly () bool
6264 Next () (PlanBuilderInput , bool )
6365 WithNext (PlanBuilderInput )
66+ WithChildren ([]PlanBuilderInput ) PlanBuilderInput
6467 SetTxnCtrlCtrs (tcc internaldto.TxnControlCounters )
6568}
6669
@@ -85,6 +88,7 @@ type StandardPlanBuilderInput struct {
8588 isCreateMaterializedView bool
8689 rawQuery string
8790 next PlanBuilderInput
91+ children []PlanBuilderInput
8892}
8993
9094func NewPlanBuilderInput (
@@ -150,6 +154,15 @@ func (pbi *StandardPlanBuilderInput) WithNext(next PlanBuilderInput) {
150154 pbi .next = next
151155}
152156
157+ func (pbi * StandardPlanBuilderInput ) GetChildren () []PlanBuilderInput {
158+ return pbi .children
159+ }
160+
161+ func (pbi * StandardPlanBuilderInput ) WithChildren (children []PlanBuilderInput ) PlanBuilderInput {
162+ pbi .children = children
163+ return pbi
164+ }
165+
153166func (pbi * StandardPlanBuilderInput ) Clone () PlanBuilderInput {
154167 clonedPbi := newPlanBuilderInput (
155168 pbi .annotatedAST ,
@@ -390,6 +403,11 @@ func (pbi *StandardPlanBuilderInput) GetSet() (*sqlparser.Set, bool) {
390403 return rv , ok
391404}
392405
406+ func (pbi * StandardPlanBuilderInput ) GetExplain () (* sqlparser.Explain , bool ) {
407+ rv , ok := pbi .stmt .(* sqlparser.Explain )
408+ return rv , ok
409+ }
410+
393411func (pbi * StandardPlanBuilderInput ) GetUpdate () (* sqlparser.Update , bool ) {
394412 rv , ok := pbi .stmt .(* sqlparser.Update )
395413 return rv , ok
0 commit comments