Skip to content

Commit

Permalink
planner: remove old useless unfinished index advisor implementation (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
qw4990 authored Sep 4, 2024
1 parent 649dce7 commit 2bd5660
Show file tree
Hide file tree
Showing 14 changed files with 7,527 additions and 8,141 deletions.
2 changes: 0 additions & 2 deletions pkg/executor/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ go_library(
"foreign_key.go",
"grant.go",
"import_into.go",
"index_advise.go",
"index_merge_reader.go",
"infoschema_reader.go",
"insert.go",
Expand Down Expand Up @@ -330,7 +329,6 @@ go_test(
"historical_stats_test.go",
"hot_regions_history_table_test.go",
"import_into_test.go",
"index_advise_test.go",
"infoschema_cluster_table_test.go",
"infoschema_reader_internal_test.go",
"infoschema_reader_test.go",
Expand Down
17 changes: 0 additions & 17 deletions pkg/executor/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ func (b *executorBuilder) build(p base.Plan) exec.Executor {
return b.buildLockStats(v)
case *plannercore.UnlockStats:
return b.buildUnlockStats(v)
case *plannercore.IndexAdvise:
return b.buildIndexAdvise(v)
case *plannercore.PlanReplayer:
return b.buildPlanReplayer(v)
case *plannercore.PhysicalLimit:
Expand Down Expand Up @@ -1089,21 +1087,6 @@ func (b *executorBuilder) buildUnlockStats(v *plannercore.UnlockStats) exec.Exec
return e
}

func (b *executorBuilder) buildIndexAdvise(v *plannercore.IndexAdvise) exec.Executor {
e := &IndexAdviseExec{
BaseExecutor: exec.NewBaseExecutor(b.ctx, nil, v.ID()),
IsLocal: v.IsLocal,
indexAdviseInfo: &IndexAdviseInfo{
Path: v.Path,
MaxMinutes: v.MaxMinutes,
MaxIndexNum: v.MaxIndexNum,
LineFieldsInfo: v.LineFieldsInfo,
Ctx: b.ctx,
},
}
return e
}

func (b *executorBuilder) buildPlanReplayer(v *plannercore.PlanReplayer) exec.Executor {
if v.Load {
e := &PlanReplayerLoadExec{
Expand Down
146 changes: 0 additions & 146 deletions pkg/executor/index_advise.go

This file was deleted.

67 changes: 0 additions & 67 deletions pkg/executor/index_advise_test.go

This file was deleted.

1 change: 0 additions & 1 deletion pkg/parser/ast/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "ast",
srcs = [
"advisor.go",
"ast.go",
"base.go",
"ddl.go",
Expand Down
85 changes: 0 additions & 85 deletions pkg/parser/ast/advisor.go

This file was deleted.

2 changes: 0 additions & 2 deletions pkg/parser/ast/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,6 @@ func GetStmtLabel(stmtNode StmtNode) string {
return "Use"
case *CreateBindingStmt:
return "CreateBinding"
case *IndexAdviseStmt:
return "IndexAdvise"
case *DropBindingStmt:
return "DropBinding"
case *TraceStmt:
Expand Down
Loading

0 comments on commit 2bd5660

Please sign in to comment.