Skip to content

Commit

Permalink
expression: disable Duration/JSON related function push down to tifla…
Browse files Browse the repository at this point in the history
…sh (#14861)
  • Loading branch information
lzmhhh123 authored Feb 24, 2020
1 parent dcdfd60 commit 98f3420
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions expression/expression.go
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,10 @@ func IsBinaryLiteral(expr Expression) bool {
// CheckExprPushFlash checks a expr list whether each expr can be pushed to flash storage.
func CheckExprPushFlash(exprs []Expression) (exprPush, remain []Expression) {
for _, expr := range exprs {
if expr.GetType().Tp == mysql.TypeDuration || expr.GetType().Tp == mysql.TypeJSON {
remain = append(remain, expr)
continue
}
switch x := expr.(type) {
case *Constant, *CorrelatedColumn, *Column:
exprPush = append(exprPush, expr)
Expand Down

0 comments on commit 98f3420

Please sign in to comment.