Skip to content

Commit

Permalink
support round function push down to TiFlash (pingcap#19616)
Browse files Browse the repository at this point in the history
  • Loading branch information
leiysky committed Sep 11, 2020
1 parent 51d365f commit 8f87805
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions expression/expression.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 8f87805

Please sign in to comment.