From 8f8780528c6ad0b2cb067c74102905442dcf59ff Mon Sep 17 00:00:00 2001 From: lei yu Date: Fri, 11 Sep 2020 12:46:29 +0800 Subject: [PATCH] support round function push down to TiFlash (#19616) --- expression/expression.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/expression/expression.go b/expression/expression.go index 2e40952b1582a..a82f6d774830a 100644 --- a/expression/expression.go +++ b/expression/expression.go @@ -1174,6 +1174,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 }