Skip to content

Commit

Permalink
fix tautological condition: non-nil != nil (nilness)
Browse files Browse the repository at this point in the history
Signed-off-by: guo-shaoge <shaoge1994@163.com>
  • Loading branch information
guo-shaoge committed Dec 29, 2022
1 parent 77a3676 commit b0a8cd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion planner/core/find_best_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -2027,7 +2027,7 @@ func (ds *DataSource) convertToTableScan(prop *property.PhysicalProperty, candid
// when got here, canMppConvertToRootForDisaggregatedTiFlash is true.
task = mppTask
task = task.convertToRootTask(ds.ctx)
if task != nil && !task.invalid() {
if !task.invalid() {
ds.addSelection4PlanCache(task.(*rootTask), ds.stats.ScaleByExpectCnt(prop.ExpectedCnt), prop)
}
}
Expand Down

0 comments on commit b0a8cd9

Please sign in to comment.