Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

planner: prohibit StreamAgg with group keys for TiFlash (#39547) #40482

Merged
merged 3 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Resolve merge conflict
  • Loading branch information
fixdb committed Jan 10, 2023
commit 60e2d6cd8ae06aad06be343c8deb5b14ebb11f6d
3 changes: 2 additions & 1 deletion executor/tiflash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,8 @@ func TestAggPushDownCountStar(t *testing.T) {
}

func TestGroupStreamAggOnTiFlash(t *testing.T) {
store := testkit.CreateMockStore(t, withMockTiFlash(2))
store, clean := testkit.CreateMockStore(t, withMockTiFlash(2))
defer clean()
tk := testkit.NewTestKit(t, store)

tk.MustExec("use test")
Expand Down
11 changes: 3 additions & 8 deletions planner/core/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -1662,20 +1662,15 @@ func (p *PhysicalStreamAgg) attach2Task(tasks ...task) task {
inputRows = t.count()
attachPlan2Task(p, t)
} else {
<<<<<<< HEAD
copTaskType := cop.getStoreType()
partialAgg, finalAgg := p.newPartialAggregate(copTaskType, false)
if finalAgg != nil {
final = finalAgg.(*PhysicalStreamAgg)
}
=======
storeType := cop.getStoreType()
// TiFlash doesn't support Stream Aggregation
if storeType == kv.TiFlash && len(p.GroupByItems) > 0 {
return invalidTask
}
partialAgg, finalAgg := p.newPartialAggregate(storeType, false)
>>>>>>> 38b0ab7333 (planner: prohibit StreamAgg with group keys for TiFlash (#39547))
if finalAgg != nil {
final = finalAgg.(*PhysicalStreamAgg)
}
if partialAgg != nil {
if cop.tablePlan != nil {
cop.finishIndexPlan()
Expand Down