Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <[email protected]>
  • Loading branch information
hawkingrei committed Jul 10, 2024
1 parent 402c482 commit ee73a33
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/planner/cardinality/selectivity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1342,4 +1342,14 @@ func TestBuiltinInEstWithoutStats(t *testing.T) {
require.NoError(t, h.InitStats(is))
tk.MustQuery("explain format='brief' select * from t where a in (1, 2, 3, 4, 5, 6, 7, 8)").Check(expectedA)
tk.MustQuery("explain format='brief' select * from t where b in (1, 2, 3, 4, 5, 6, 7, 8)").Check(expectedB)
require.NoError(t, h.Update(is))
tbl, err := is.TableByName(context.Background(), model.NewCIStr("test"), model.NewCIStr("t"))
require.NoError(t, err)
statsTbl, found := h.Get(tbl.Meta().ID)
require.True(t, found)
require.False(t, statsTbl.ColAndIdxExistenceMap.IsEmpty())
for _, col := range tbl.Cols() {
require.True(t, statsTbl.ColAndIdxExistenceMap.Has(col.ID, false))
require.False(t, statsTbl.ColAndIdxExistenceMap.HasAnalyzed(col.ID, false))
}
}

0 comments on commit ee73a33

Please sign in to comment.