Skip to content

Commit

Permalink
[staticcheck] Last few staticchecks! (#13909)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Mason <[email protected]>
  • Loading branch information
Andrew Mason authored Sep 5, 2023
1 parent 245670f commit 6d26dad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go/test/endtoend/throttler/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func UpdateThrottlerTopoConfigRaw(vtctldProcess *cluster.VtctldClientProcess, ke
}
if appRule != nil {
args = append(args, "--throttle-app", appRule.Name)
args = append(args, "--throttle-app-duration", protoutil.TimeFromProto(appRule.ExpiresAt).UTC().Sub(time.Now()).String())
args = append(args, "--throttle-app-duration", time.Until(protoutil.TimeFromProto(appRule.ExpiresAt).UTC()).String())
args = append(args, "--throttle-app-ratio", fmt.Sprintf("%f", appRule.Ratio))
if appRule.Exempt {
args = append(args, "--throttle-app-exempt")
Expand Down
5 changes: 3 additions & 2 deletions go/vt/vtgate/planbuilder/operators/route_planning.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,9 @@ func unwrapDerivedTables(ctx *plancontext.PlanningContext, exp sqlparser.Expr) s
}

exp = semantics.RewriteDerivedTableExpression(exp, tbl)
exp = getColName(exp)
if exp == nil {
if col := getColName(exp); col != nil {
exp = col
} else {
return nil
}
}
Expand Down

0 comments on commit 6d26dad

Please sign in to comment.