diff --git a/go/test/endtoend/throttler/util.go b/go/test/endtoend/throttler/util.go index 8722c283409..40cfdb53118 100644 --- a/go/test/endtoend/throttler/util.go +++ b/go/test/endtoend/throttler/util.go @@ -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") diff --git a/go/vt/vtgate/planbuilder/operators/route_planning.go b/go/vt/vtgate/planbuilder/operators/route_planning.go index fa8a12d97ac..6bf88e15847 100644 --- a/go/vt/vtgate/planbuilder/operators/route_planning.go +++ b/go/vt/vtgate/planbuilder/operators/route_planning.go @@ -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 } }