Skip to content

Commit

Permalink
executor: refactor executor and baseExecutor
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
  • Loading branch information
hawkingrei committed Jul 3, 2023
1 parent 74598d2 commit f29a423
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions executor/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -709,17 +709,17 @@ func (b *executorBuilder) buildChecksumTable(v *plannercore.ChecksumTable) exec.
}

func (b *executorBuilder) buildReloadExprPushdownBlacklist(_ *plannercore.ReloadExprPushdownBlacklist) exec.Executor {
base := exec.NewBaseExecutor(b.ctx, nil, 0, nil)
base := exec.NewBaseExecutor(b.ctx, nil, 0)
return &ReloadExprPushdownBlacklistExec{base}
}

func (b *executorBuilder) buildReloadOptRuleBlacklist(_ *plannercore.ReloadOptRuleBlacklist) exec.Executor {
base := exec.NewBaseExecutor(b.ctx, nil, 0, nil)
base := exec.NewBaseExecutor(b.ctx, nil, 0)
return &ReloadOptRuleBlacklistExec{BaseExecutor: base}
}

func (b *executorBuilder) buildAdminPlugins(v *plannercore.AdminPlugins) exec.Executor {
base := exec.NewBaseExecutor(b.ctx, nil, 0, nil)
base := exec.NewBaseExecutor(b.ctx, nil, 0)
return &AdminPluginsExec{BaseExecutor: base, Action: v.Action, Plugins: v.Plugins}
}

Expand Down
2 changes: 1 addition & 1 deletion executor/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -2332,7 +2332,7 @@ func tryFillViewColumnType(ctx context.Context, sctx sessionctx.Context, is info
}

func runWithSystemSession(ctx context.Context, sctx sessionctx.Context, fn func(sessionctx.Context) error) error {
b := exec.NewBaseExecutor(sctx, nil, 0, nil)
b := exec.NewBaseExecutor(sctx, nil, 0)
sysCtx, err := b.GetSysSession()
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion executor/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func TestEqualDatumsAsBinary(t *testing.T) {
{[]interface{}{1}, []interface{}{1, 1}, false},
{[]interface{}{nil}, []interface{}{1}, false},
}
base := exec.NewBaseExecutor(core.MockContext(), nil, 0, nil)
base := exec.NewBaseExecutor(core.MockContext(), nil, 0)
e := &InsertValues{BaseExecutor: base}
for _, tt := range tests {
res, err := e.equalDatumsAsBinary(types.MakeDatums(tt.a...), types.MakeDatums(tt.b...))
Expand Down

0 comments on commit f29a423

Please sign in to comment.