From 4e4b225f5bad6b7edac8553bc0f2a07efcc19180 Mon Sep 17 00:00:00 2001 From: lysu Date: Wed, 12 Dec 2018 13:21:58 +0800 Subject: [PATCH] expression: fix abs push down sign bug (#8622) (#8628) --- 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}