We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ea2ec8 commit fde3a79Copy full SHA for fde3a79
expression/scalar_function.go
@@ -167,10 +167,8 @@ func (sf *ScalarFunction) IsCorrelated() bool {
167
168
// ConstItem implements Expression interface.
169
func (sf *ScalarFunction) ConstItem() bool {
170
- if _, ok := DeferredFunctions[sf.FuncName.L]; ok {
171
- return false
172
- }
173
- 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 {
174
return false
175
}
176
for _, arg := range sf.GetArgs() {
0 commit comments