Skip to content

Commit

Permalink
add default behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
fzhedu committed Nov 13, 2020
1 parent b5dedb1 commit 384e507
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions planner/core/expression_rewriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,15 @@ func (er *expressionRewriter) Enter(inNode ast.Node) (ast.Node, bool) {
er.tryFoldCounter++
}
case *ast.CaseExpr:
er.asScalar = true
if _, ok := expression.DisableFoldFunctions["case"]; ok {
er.disableFoldCounter++
}
if _, ok := expression.TryFoldFunctions["case"]; ok {
er.tryFoldCounter++
}
case *ast.BinaryOperationExpr:
er.asScalar = true
if v.Op == opcode.LogicAnd || v.Op == opcode.LogicOr {
er.tryFoldCounter++
}
Expand Down

0 comments on commit 384e507

Please sign in to comment.