Skip to content

Commit

Permalink
Update tiflash expr pushdown list (#3434) (#3445)
Browse files Browse the repository at this point in the history
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
  • Loading branch information
ti-srebot authored Jul 28, 2020
1 parent 91866c8 commit 999b06f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tiflash/use-tiflash.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/v4.0.0-rc/expression/expression.go#L979).
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/v4.0.0-rc/expression/expression.go#L979), 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.

0 comments on commit 999b06f

Please sign in to comment.