Skip to content

Commit

Permalink
prevent function DATE_ADD/SUB_STRING_XXX pushed down to TiFlash
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxin9014 committed Nov 25, 2021
1 parent 78c653e commit 69a237a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions expression/expression.go
Original file line number Diff line number Diff line change
Expand Up @@ -1094,12 +1094,12 @@ func scalarExprSupportedByFlash(function *ScalarFunction) bool {
}
case ast.DateAdd, ast.AddDate:
switch function.Function.PbCode() {
case tipb.ScalarFuncSig_AddDateDatetimeInt, tipb.ScalarFuncSig_AddDateStringInt, tipb.ScalarFuncSig_AddDateStringReal:
case tipb.ScalarFuncSig_AddDateDatetimeInt:
return true
}
case ast.DateSub, ast.SubDate:
switch function.Function.PbCode() {
case tipb.ScalarFuncSig_SubDateDatetimeInt, tipb.ScalarFuncSig_SubDateStringInt:
case tipb.ScalarFuncSig_SubDateDatetimeInt:
return true
}
case ast.UnixTimestamp:
Expand Down

0 comments on commit 69a237a

Please sign in to comment.