lance6716
lance6716
@Anudhyan Please read the issue. Use golang built-in functions like https://pkg.go.dev/builtin#max. And delete `mathutil. Max`
> Do I need to do the same for this file only? [tidb/pkg/util/mathutil/math.go] No. Delete `mathutil.Max` and let caller use golang built-in `max`. Also for `min` and other proper functions.
> @lance6716 are you talking about this change: > > `result := math.Max(float64(a), float64(b))` I don't know where's the code you refer to. I think the issue is clear and...
> Okay, thanks for the clarification! So, @Anudhyan you have to delete mathutil.Max and mathutil.Min and replace them with Go's built-in math.Max and math.Min functions The built-in functions are called...
Obviously `max` and `min` ARE variadic in nature. Please learn some basic golang knowledge before you contribute.
/assign @songzhibin97
https://do.pingcap.net/jenkins/blue/organizations/jenkins/pingcap%2Ftidb%2Fpull_lightning_integration_test/detail/pull_lightning_integration_test/2236/pipeline ``` tidb lightning encountered error: [Lightning:Restore:ErrRestoreTable]restore table `test`.`test_time` failed: rpc error: code = Unknown desc = [PD:tso:ErrGenerateTimestamp]generate timestamp failed, requested pd is not leader of cluster ``` another case
another case https://do.pingcap.net/jenkins/blue/organizations/jenkins/pingcap%2Ftidb%2Fpull_lightning_integration_test/detail/pull_lightning_integration_test/2533/pipeline ``` tidb lightning encountered error: [Lightning:Restore:ErrRestoreTable]restore table `incr`.`auto_random` failed: rpc error: code = Unknown desc = [PD:tso:ErrGenerateTimestamp]generate timestamp failed, requested pd is not leader of cluster ```
another case https://do.pingcap.net/jenkins/blue/organizations/jenkins/pingcap%2Ftidb%2Frelease-8.1%2Fghpr_check2/detail/ghpr_check2/1095/pipeline ``` run test [executor/sample] err: sql:select * from t tablesample regions() order by a;: run "select * from t tablesample regions() order by a;" at line 140...
``` tidb lightning encountered error: [Lightning:Restore:ErrRestoreTable]restore table `test`.`t` failed: rpc error: code = Unknown desc = [PD:tso:ErrGenerateTimestamp]generate timestamp failed, requested pd is not leader of cluster ``` https://do.pingcap.net/jenkins/blue/organizations/jenkins/pingcap%2Ftidb%2Fpull_lightning_integration_test/detail/pull_lightning_integration_test/5482/pipeline