Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/planner/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ go_library(
"//pkg/metrics",
"//pkg/parser/ast",
"//pkg/parser/model",
"//pkg/planner/cascades",
"//pkg/planner/cascades/old",
"//pkg/planner/core",
"//pkg/planner/core/base",
"//pkg/planner/core/resolve",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
name = "cascades",
name = "old",
srcs = [
"enforcer_rules.go",
"implementation_rules.go",
"optimize.go",
"stringer.go",
"transformation_rules.go",
],
importpath = "github.com/pingcap/tidb/pkg/planner/cascades",
importpath = "github.com/pingcap/tidb/pkg/planner/cascades/old",
visibility = ["//visibility:public"],
deps = [
"//pkg/expression",
Expand Down Expand Up @@ -37,7 +37,7 @@ go_library(
)

go_test(
name = "cascades_test",
name = "old_test",
timeout = "short",
srcs = [
"enforcer_rules_test.go",
Expand All @@ -47,7 +47,7 @@ go_test(
"transformation_rules_test.go",
],
data = glob(["testdata/**"]),
embed = [":cascades"],
embed = [":old"],
flaky = True,
shard_count = 25,
deps = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package cascades
package old

import (
"math"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package cascades
package old

import (
"testing"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package cascades
package old

import (
"math"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package cascades
package old

import (
"flag"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package cascades
package old

import (
"container/list"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package cascades
package old

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package cascades
package old

import (
"bytes"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package cascades
package old

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package cascades
package old

import (
"math"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package cascades
package old

import (
"context"
Expand Down
4 changes: 2 additions & 2 deletions pkg/planner/optimize.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/pingcap/tidb/pkg/metrics"
"github.com/pingcap/tidb/pkg/parser/ast"
"github.com/pingcap/tidb/pkg/parser/model"
"github.com/pingcap/tidb/pkg/planner/cascades"
"github.com/pingcap/tidb/pkg/planner/cascades/old"
"github.com/pingcap/tidb/pkg/planner/core"
"github.com/pingcap/tidb/pkg/planner/core/base"
"github.com/pingcap/tidb/pkg/planner/core/resolve"
Expand Down Expand Up @@ -521,7 +521,7 @@ func optimize(ctx context.Context, sctx planctx.PlanContext, node *resolve.NodeW

// Handle the logical plan statement, use cascades planner if enabled.
if sessVars.GetEnableCascadesPlanner() {
finalPlan, cost, err := cascades.DefaultOptimizer.FindBestPlan(sctx, logic)
finalPlan, cost, err := old.DefaultOptimizer.FindBestPlan(sctx, logic)
return finalPlan, names, cost, err
}

Expand Down