Skip to content

Commit

Permalink
Use unfoldablefunc to simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
wjhuang2016 committed Apr 12, 2019
1 parent 6ea2ec8 commit fde3a79
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions expression/scalar_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,8 @@ func (sf *ScalarFunction) IsCorrelated() bool {

// ConstItem implements Expression interface.
func (sf *ScalarFunction) ConstItem() bool {
if _, ok := DeferredFunctions[sf.FuncName.L]; ok {
return false
}
if sf.FuncName.L == ast.GetParam {
// Note: some unfoldable functions are deterministic, we use unFoldableFunctions here for simplification.
if _, ok := unFoldableFunctions[sf.FuncName.L]; ok {
return false
}
for _, arg := range sf.GetArgs() {
Expand Down

0 comments on commit fde3a79

Please sign in to comment.