From dcadfa11c8e50bda5f213b27bd88a0b8b5c10467 Mon Sep 17 00:00:00 2001 From: yikeke Date: Tue, 28 Jul 2020 14:06:40 +0800 Subject: [PATCH] Update use-tiflash.md --- tiflash/use-tiflash.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tiflash/use-tiflash.md b/tiflash/use-tiflash.md index ecb2366d3ab56..3581e979b2aa1 100644 --- a/tiflash/use-tiflash.md +++ b/tiflash/use-tiflash.md @@ -221,11 +221,18 @@ You can configure this parameter in either of the following ways: TiFlash mainly supports predicate and aggregate push-down calculations. Push-down calculations can help TiDB perform distributed acceleration. Currently, table joins and `DISTINCT COUNT` are not the supported calculation types, which will be optimized in later versions. -Currently, TiFlash supports pushing down a limited number of expressions. To learn the supported expressions, refer to [expression list](https://github.com/pingcap/tidb/blob/692e0098b1207ef26ea18bedfcc9ba067604da3c/expression/expression.go#L1115). +Currently, TiFlash supports pushing down a limited number of expressions, including: + +``` ++, -, /, *, >=, <=, =, !=, <, >, ifnull, isnull, bitor, in, mod, bitand, or, and, like, not, +case when, month, substr, timestampdiff, date_format, from_unixtime, json_length, if, bitneg, bitxor, cast(int as decimal), date_add(datetime, int), date_add(datetime, string) +``` + +Among them, the push-down of `cast` and `date_add` is not enabled by default. To enable it, refer to [Blocklist of Optimization Rules and Expression Pushdown](/blocklist-control-plan.md). TiFlash does not support push-down calculations in the following situations: -- Expressions that contain `Duration` and `JSON` cannot be pushed down. -- If an aggregate function or a `WHERE` clause contains expressions that are not in [this list](https://github.com/pingcap/tidb/blob/692e0098b1207ef26ea18bedfcc9ba067604da3c/expression/expression.go#L1115), the aggregate or related predicate filtering cannot be pushed down. +- Expressions that contain `Duration` cannot be pushed down. +- If an aggregate function or a `WHERE` clause contains expressions that are not included in the list above, the aggregate or related predicate filtering cannot be pushed down. If a query encounters unsupported push-down calculations, TiDB needs to complete the remaining calculations, which might greatly affect the TiFlash acceleration effect.