Skip to content

Commit c072586

Browse files
committed
update
Signed-off-by: Weizhen Wang <[email protected]>
1 parent 9ba0779 commit c072586

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/planner/core/constraint/exprs.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ func DeleteTrueExprs(p base.LogicalPlan, conds []expression.Expression) []expres
4444

4545
// IsConstFalse is used to check whether the expression is a constant false expression.
4646
func IsConstFalse(ctx expression.BuildContext, expr expression.Expression) bool {
47-
if expression.MaybeOverOptimized4PlanCache(ctx, []expression.Expression{expr}) {
48-
ctx.SetSkipPlanCache("some parameters may be overwritten when constant propagation")
49-
}
5047
if e, ok := expr.(*expression.ScalarFunction); ok {
5148
switch e.FuncName.L {
5249
case ast.LT, ast.LE, ast.GT, ast.GE, ast.EQ, ast.NE:
5350
if constExpr, ok := e.GetArgs()[1].(*expression.Constant); ok && constExpr.Value.IsNull() && constExpr.DeferredExpr == nil {
51+
if expression.MaybeOverOptimized4PlanCache(ctx, []expression.Expression{expr}) {
52+
ctx.SetSkipPlanCache("some parameters may be overwritten when constant propagation")
53+
}
5454
return true
5555
}
5656
}

0 commit comments

Comments
 (0)