From e67e446b0cb3e9c81a866e27e1833eeb153064ab Mon Sep 17 00:00:00 2001 From: lysu Date: Mon, 10 Dec 2018 10:48:49 +0800 Subject: [PATCH] expression: fix abs push down sign bug (#8622) --- expression/builtin_math.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/expression/builtin_math.go b/expression/builtin_math.go index 8ddec64a81391..90e840c122db2 100644 --- a/expression/builtin_math.go +++ b/expression/builtin_math.go @@ -142,10 +142,10 @@ func (c *absFunctionClass) getFunction(ctx sessionctx.Context, args []Expression case types.ETInt: if mysql.HasUnsignedFlag(argFieldTp.Flag) { sig = &builtinAbsUIntSig{bf} - sig.setPbCode(tipb.ScalarFuncSig_AbsInt) + sig.setPbCode(tipb.ScalarFuncSig_AbsUInt) } else { sig = &builtinAbsIntSig{bf} - sig.setPbCode(tipb.ScalarFuncSig_AbsUInt) + sig.setPbCode(tipb.ScalarFuncSig_AbsInt) } case types.ETDecimal: sig = &builtinAbsDecSig{bf}