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 Dec 5, 2024
1 parent f28cf12 commit 7379502
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pkg/executor/test/tiflashtest/tiflash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ func TestIssue57149(t *testing.T) {
}

func TestTiFlashPartitionTableBroadcastJoin(t *testing.T) {
store := testkit.CreateMockStore(t, withMockTiFlash(2))
store, dom := testkit.CreateMockStoreAndDomain(t, withMockTiFlash(2))
tk := testkit.NewTestKit(t, store)
tk.MustExec("create database tiflash_partition_BCJ")
tk.MustExec("use tiflash_partition_BCJ")
Expand All @@ -1040,7 +1040,8 @@ func TestTiFlashPartitionTableBroadcastJoin(t *testing.T) {
partition p0 values in (` + listPartitions[0] + `), partition p1 values in (` + listPartitions[1] + `),
partition p2 values in (` + listPartitions[2] + `), partition p3 values in (` + listPartitions[3] + `))`)
tk.MustExec(`create table tnormal (a int, b int) partition by hash(a) partitions 4`)

h := dom.StatsHandle()
require.NoError(t, h.HandleDDLEvent(<-h.DDLEventCh()))
for _, tbl := range []string{`thash`, `trange`, `tlist`, `tnormal`} {
tk.MustExec("alter table " + tbl + " set tiflash replica 1")
tb := external.GetTableByName(t, tk, "tiflash_partition_BCJ", tbl)
Expand Down
2 changes: 1 addition & 1 deletion pkg/statistics/handle/globalstats/global_stats_async.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ func (a *AsyncMergePartitionStats2GlobalStats) dealHistogramAndTopN(stmtCtx *stm
if err != nil {
return err
}
if allhg != nil && len(poppedTopN) == 0 {
if len(allhg) == 0 && len(poppedTopN) == 0 {
return errors.New("empty hg cannot merge")
}
// Merge histogram.
Expand Down

0 comments on commit 7379502

Please sign in to comment.