Skip to content

Commit

Permalink
Resolve test conflict
Browse files Browse the repository at this point in the history
Signed-off-by: yibin87 <huyibin@pingcap.com>
  • Loading branch information
yibin87 committed Mar 6, 2025
1 parent 442aeab commit 1e6073f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 33 deletions.
6 changes: 1 addition & 5 deletions executor/tiflashtest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ go_test(
],
flaky = True,
race = "on",
<<<<<<< HEAD:executor/tiflashtest/BUILD.bazel
shard_count = 28,
=======
shard_count = 48,
>>>>>>> b2a9059b5e1 (planner: Limit fine grained shuffle usage for mpp join operators to ensure shuffle keys are the same with actual join keys (#59884)):pkg/executor/test/tiflashtest/BUILD.bazel
shard_count = 29,
deps = [
"//config",
"//domain",
Expand Down
49 changes: 21 additions & 28 deletions executor/tiflashtest/tiflash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1418,50 +1418,43 @@ func TestIssue59877(t *testing.T) {
tk.MustExec("create table t1(id bigint, v1 int)")
tk.MustExec("alter table t1 set tiflash replica 1")
tb := external.GetTableByName(t, tk, "test", "t1")
err := domain.GetDomain(tk.Session()).DDLExecutor().UpdateTableReplicaInfo(tk.Session(), tb.Meta().ID, true)
err := domain.GetDomain(tk.Session()).DDL().UpdateTableReplicaInfo(tk.Session(), tb.Meta().ID, true)
require.NoError(t, err)
tk.MustExec("create table t2(id bigint unsigned, v1 int)")
tk.MustExec("alter table t2 set tiflash replica 1")
tb = external.GetTableByName(t, tk, "test", "t2")
err = domain.GetDomain(tk.Session()).DDLExecutor().UpdateTableReplicaInfo(tk.Session(), tb.Meta().ID, true)
err = domain.GetDomain(tk.Session()).DDL().UpdateTableReplicaInfo(tk.Session(), tb.Meta().ID, true)
require.NoError(t, err)
tk.MustExec("create table t3(id bigint, v1 int)")
tk.MustExec("alter table t3 set tiflash replica 1")
tb = external.GetTableByName(t, tk, "test", "t3")
err = domain.GetDomain(tk.Session()).DDLExecutor().UpdateTableReplicaInfo(tk.Session(), tb.Meta().ID, true)
err = domain.GetDomain(tk.Session()).DDL().UpdateTableReplicaInfo(tk.Session(), tb.Meta().ID, true)
require.NoError(t, err)

tk.MustExec("set @@session.tidb_isolation_read_engines=\"tiflash\"")
// unistore does not support later materialization
tk.MustExec("set tidb_opt_enable_late_materialization=0")
tk.MustExec("set @@session.tidb_allow_mpp=ON")
tk.MustExec("set @@session.tidb_enforce_mpp=ON")
tk.MustExec("set tidb_broadcast_join_threshold_size=0")
tk.MustExec("set tidb_broadcast_join_threshold_count=0")
tk.MustExec("set tiflash_fine_grained_shuffle_stream_count=8")
tk.MustExec("set tidb_enforce_mpp=1")
tk.MustQuery("explain format=\"brief\" select /*+ hash_join_build(t3) */ count(*) from t1 straight_join t2 on t1.id = t2.id straight_join t3 on t1.id = t3.id").Check(
testkit.Rows("HashAgg 1.00 root funcs:count(Column#18)->Column#10",
"└─TableReader 1.00 root MppVersion: 3, data:ExchangeSender",
" └─ExchangeSender 1.00 mpp[tiflash] ExchangeType: PassThrough",
" └─HashAgg 1.00 mpp[tiflash] funcs:count(1)->Column#18",
" └─Projection 15609.38 mpp[tiflash] test.t1.id, Column#14",
" └─HashJoin 15609.38 mpp[tiflash] inner join, equal:[eq(test.t1.id, test.t3.id)]",
" ├─ExchangeReceiver(Build) 9990.00 mpp[tiflash] ",
" │ └─ExchangeSender 9990.00 mpp[tiflash] ExchangeType: HashPartition, Compression: FAST, Hash Cols: [name: Column#17, collate: binary]",
" │ └─Projection 9990.00 mpp[tiflash] test.t3.id, cast(test.t3.id, decimal(20,0))->Column#17",
" │ └─Selection 9990.00 mpp[tiflash] not(isnull(test.t3.id))",
" │ └─TableFullScan 10000.00 mpp[tiflash] table:t3 keep order:false, stats:pseudo",
" └─Projection(Probe) 12487.50 mpp[tiflash] test.t1.id, Column#14",
" └─HashJoin 12487.50 mpp[tiflash] inner join, equal:[eq(test.t1.id, test.t2.id)]",
" ├─ExchangeReceiver(Build) 9990.00 mpp[tiflash] ",
" │ └─ExchangeSender 9990.00 mpp[tiflash] ExchangeType: HashPartition, Compression: FAST, Hash Cols: [name: Column#13, collate: binary]",
" │ └─Projection 9990.00 mpp[tiflash] test.t1.id, cast(test.t1.id, decimal(20,0))->Column#13",
" │ └─Selection 9990.00 mpp[tiflash] not(isnull(test.t1.id))",
" │ └─TableFullScan 10000.00 mpp[tiflash] table:t1 keep order:false, stats:pseudo",
" └─ExchangeReceiver(Probe) 9990.00 mpp[tiflash] ",
" └─ExchangeSender 9990.00 mpp[tiflash] ExchangeType: HashPartition, Compression: FAST, Hash Cols: [name: Column#14, collate: binary]",
" └─Projection 9990.00 mpp[tiflash] test.t2.id, cast(test.t2.id, decimal(20,0) UNSIGNED)->Column#14",
" └─Selection 9990.00 mpp[tiflash] not(isnull(test.t2.id))",
" └─TableFullScan 10000.00 mpp[tiflash] table:t2 keep order:false, stats:pseudo"))
testkit.Rows("HashAgg 1.00 root funcs:count(1)->Column#10",
"└─HashJoin 15609.38 root inner join, equal:[eq(test.t1.id, test.t3.id)]",
" ├─TableReader(Build) 9990.00 root data:Selection",
" │ └─Selection 9990.00 cop[tiflash] not(isnull(test.t3.id))",
" │ └─TableFullScan 10000.00 cop[tiflash] table:t3 keep order:false, stats:pseudo",
" └─TableReader(Probe) 12487.50 root data:ExchangeSender",
" └─ExchangeSender 12487.50 mpp[tiflash] ExchangeType: PassThrough",
" └─HashJoin 12487.50 mpp[tiflash] inner join, equal:[eq(test.t1.id, test.t2.id)]",
" ├─ExchangeReceiver(Build) 9990.00 mpp[tiflash] ",
" │ └─ExchangeSender 9990.00 mpp[tiflash] ExchangeType: HashPartition, Hash Cols: [name: Column#11, collate: binary]",
" │ └─Projection 9990.00 mpp[tiflash] test.t1.id, cast(test.t1.id, decimal(20,0))->Column#11",
" │ └─Selection 9990.00 mpp[tiflash] not(isnull(test.t1.id))",
" │ └─TableFullScan 10000.00 mpp[tiflash] table:t1 keep order:false, stats:pseudo",
" └─ExchangeReceiver(Probe) 9990.00 mpp[tiflash] ",
" └─ExchangeSender 9990.00 mpp[tiflash] ExchangeType: HashPartition, Hash Cols: [name: Column#12, collate: binary]",
" └─Projection 9990.00 mpp[tiflash] test.t2.id, cast(test.t2.id, decimal(20,0) UNSIGNED)->Column#12",
" └─Selection 9990.00 mpp[tiflash] not(isnull(test.t2.id))",
" └─TableFullScan 10000.00 mpp[tiflash] table:t2 keep order:false, stats:pseudo"))
}

0 comments on commit 1e6073f

Please sign in to comment.