Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
qw4990 committed Mar 8, 2023
1 parent f8435b2 commit 9fa95e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions planner/core/plan_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import (
"context"
"errors"
"fmt"
"github.com/pingcap/tidb/planner"
"github.com/pingcap/tidb/session"
"math/rand"
"strconv"
"strings"
Expand All @@ -28,7 +26,9 @@ import (
"github.com/pingcap/tidb/expression"
"github.com/pingcap/tidb/kv"
"github.com/pingcap/tidb/parser/mysql"
"github.com/pingcap/tidb/planner"
plannercore "github.com/pingcap/tidb/planner/core"
"github.com/pingcap/tidb/session"
"github.com/pingcap/tidb/testkit"
"github.com/pingcap/tidb/types"
"github.com/pingcap/tidb/util"
Expand Down Expand Up @@ -159,11 +159,11 @@ func TestNonPreparedPlanCachePlanString(t *testing.T) {
}

require.Equal(t, planString("select a from t where a < 1"), "IndexReader(Index(t.a)[[-inf,1)])")
require.Equal(t, planString("select a from t where a < 10"), "IndexReader(Index(t.a)[[-inf,10)])")
require.Equal(t, planString("select a from t where a < 10"), "IndexReader(Index(t.a)[[-inf,10)])") // range 1 -> 10
tk.MustQuery(`select @@last_plan_from_cache`).Check(testkit.Rows("1"))

require.Equal(t, planString("select * from t where b < 1"), "TableReader(Table(t)->Sel([lt(test.t.b, 1)]))")
require.Equal(t, planString("select * from t where b < 10"), "TableReader(Table(t)->Sel([lt(test.t.b, 10)]))")
require.Equal(t, planString("select * from t where b < 10"), "TableReader(Table(t)->Sel([lt(test.t.b, 10)]))") // filter 1 -> 10
tk.MustQuery(`select @@last_plan_from_cache`).Check(testkit.Rows("1"))
}

Expand Down

0 comments on commit 9fa95e0

Please sign in to comment.