From 6d2ecd521bb2863f8c1c4251fc3830fd17bcd4a9 Mon Sep 17 00:00:00 2001 From: Keke Yi <40977455+yikeke@users.noreply.github.com> Date: Tue, 28 Jul 2020 15:40:15 +0800 Subject: [PATCH 1/2] cherry pick #3434 to release-4.0 Signed-off-by: ti-srebot --- tiflash/use-tiflash.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tiflash/use-tiflash.md b/tiflash/use-tiflash.md index e56508fa69244..e1e36482bd4a0 100644 --- a/tiflash/use-tiflash.md +++ b/tiflash/use-tiflash.md @@ -221,11 +221,27 @@ 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. +<<<<<<< HEAD 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/v4.0.0-rc/expression/expression.go#L979). 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/v4.0.0-rc/expression/expression.go#L979), the aggregate or related predicate filtering cannot be pushed down. +======= +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` 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. +>>>>>>> 517e0aa... Update use-tiflash.md (#3434) If a query encounters unsupported push-down calculations, TiDB needs to complete the remaining calculations, which might greatly affect the TiFlash acceleration effect. From 090d43788ba8e69c7d8464918a334f525dab42b9 Mon Sep 17 00:00:00 2001 From: yikeke Date: Tue, 28 Jul 2020 15:42:56 +0800 Subject: [PATCH 2/2] Update use-tiflash.md --- tiflash/use-tiflash.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tiflash/use-tiflash.md b/tiflash/use-tiflash.md index e1e36482bd4a0..398a697b895e5 100644 --- a/tiflash/use-tiflash.md +++ b/tiflash/use-tiflash.md @@ -221,14 +221,6 @@ 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. -<<<<<<< HEAD -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/v4.0.0-rc/expression/expression.go#L979). - -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/v4.0.0-rc/expression/expression.go#L979), the aggregate or related predicate filtering cannot be pushed down. -======= Currently, TiFlash supports pushing down a limited number of expressions, including: ``` @@ -242,6 +234,5 @@ TiFlash does not support push-down calculations in the following situations: - 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. ->>>>>>> 517e0aa... Update use-tiflash.md (#3434) If a query encounters unsupported push-down calculations, TiDB needs to complete the remaining calculations, which might greatly affect the TiFlash acceleration effect.