Skip to content

Commit

Permalink
Error instead of panic in pushJoinPredicate
Browse files Browse the repository at this point in the history
Signed-off-by: Florent Poinsard <[email protected]>
  • Loading branch information
frouioui committed Sep 16, 2021
1 parent f5c25cb commit a837c83
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions go/vt/vtgate/planbuilder/route_planning.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package planbuilder

import (
"fmt"
"io"
"sort"

Expand Down Expand Up @@ -419,7 +418,7 @@ func pushJoinPredicate(ctx *planningContext, exprs []sqlparser.Expr, tree queryT
// vindexFunc cannot accept predicates from the other side of a join
return node, nil
default:
panic(fmt.Sprintf("BUG: unknown type %T", node))
return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "BUG: unknown type %T", node)
}
}

Expand Down

0 comments on commit a837c83

Please sign in to comment.