From 98f342036279e7d0ecfdd50ba801e1ec92839072 Mon Sep 17 00:00:00 2001 From: "Zhuomin(Charming) Liu" Date: Mon, 24 Feb 2020 16:28:07 +0800 Subject: [PATCH] expression: disable Duration/JSON related function push down to tiflash (#14861) --- expression/expression.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/expression/expression.go b/expression/expression.go index 14994b384c113..4cec2481facbd 100644 --- a/expression/expression.go +++ b/expression/expression.go @@ -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)