Skip to content

Commit

Permalink
Merge pull request pingcap#24 from rebelice/fix_panic
Browse files Browse the repository at this point in the history
fix count(distinct) panic
  • Loading branch information
crazycs520 authored Jan 7, 2022
2 parents c8dbc74 + 833aeb0 commit 7645e5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions planner/core/common_plans.go
Original file line number Diff line number Diff line change
Expand Up @@ -1738,7 +1738,7 @@ func BuildAWSQueryInfo(v *PhysicalTableReader, id int64) *RestoreData {
info.GroupBy = buffer.String()
if len(info.Col) == 0 {
info.Col = info.GroupBy
} else {
} else if len(info.Agg) != 0 {
info.Col = fmt.Sprintf("%v, %v", info.Col, info.GroupBy)
}
}
Expand Down Expand Up @@ -1773,7 +1773,7 @@ func BuildAWSQueryInfo(v *PhysicalTableReader, id int64) *RestoreData {
info.GroupBy = buffer.String()
if len(info.Col) == 0 {
info.Col = info.GroupBy
} else {
} else if len(info.Agg) != 0 {
info.Col = fmt.Sprintf("%v, %v", info.Col, info.GroupBy)
}
}
Expand Down

0 comments on commit 7645e5b

Please sign in to comment.