From d56980bdddd366bb928f665660cacf14b5f542cf Mon Sep 17 00:00:00 2001 From: ti-srebot <66930949+ti-srebot@users.noreply.github.com> Date: Mon, 21 Sep 2020 15:18:15 +0800 Subject: [PATCH] cherry pick #19616 to release-4.0 (#19967) --- expression/expression.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/expression/expression.go b/expression/expression.go index 25377c14875c3..36be2a14475fc 100644 --- a/expression/expression.go +++ b/expression/expression.go @@ -1175,6 +1175,14 @@ func scalarExprSupportedByFlash(function *ScalarFunction) bool { default: return false } + case ast.Round: + switch function.Function.PbCode() { + case tipb.ScalarFuncSig_RoundInt, tipb.ScalarFuncSig_RoundReal, + tipb.ScalarFuncSig_RoundDec: + return true + default: + return false + } default: return false }