Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revise expressions pushed down #8684

Merged
merged 14 commits into from
Mar 24, 2022
Prev Previous commit
Next Next commit
address the comment
Signed-off-by: yisaer <disxiaofei@163.com>
  • Loading branch information
Yisaer committed Mar 17, 2022
commit 96d2e659eb7a16842627624f081314c659b95349
8 changes: 7 additions & 1 deletion functions-and-operators/expressions-pushed-down.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ aliases: ['/docs-cn/dev/functions-and-operators/expressions-pushed-down/','/docs
| [控制流运算](/functions-and-operators/control-flow-functions.md) | [`CASE`](https://dev.mysql.com/doc/refman/5.7/en/flow-control-functions.html#operator_case), [`IF()`](https://dev.mysql.com/doc/refman/5.7/en/flow-control-functions.html#function_if), [`IFNULL()`](https://dev.mysql.com/doc/refman/5.7/en/flow-control-functions.html#function_ifnull) |
| [JSON运算](/functions-and-operators/json-functions.md) | [JSON_TYPE(json_val)][json_type],<br/> [JSON_EXTRACT(json_doc, path[, path] ...)][json_extract],<br/> [JSON_OBJECT(key, val[, key, val] ...)][json_object],<br/> [JSON_ARRAY([val[, val] ...])][json_array],<br/> [JSON_MERGE(json_doc, json_doc[, json_doc] ...)][json_merge],<br/> [JSON_SET(json_doc, path, val[, path, val] ...)][json_set],<br/> [JSON_INSERT(json_doc, path, val[, path, val] ...)][json_insert],<br/> [JSON_REPLACE(json_doc, path, val[, path, val] ...)][json_replace],<br/> [JSON_REMOVE(json_doc, path[, path] ...)][json_remove] |
| [日期运算](/functions-and-operators/date-and-time-functions.md) | [`DATE_FORMAT()`](https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_date-format) |
| [数据类型](/data-type-overview.md) | [BIT](/data-type-numeric.md#bit-类型), [ENUM](/data-type-string.md#enum-类型) |

## 禁止特定表达式下推

Expand Down Expand Up @@ -51,6 +50,13 @@ tidb> desc mysql.expr_pushdown_blacklist;
>
> `tidb` 是一种特殊的 store_type,其含义是 TiDB 内存表,比如:`PERFORMANCE_SCHEMA.events_statements_summary_by_digest`,属于系统表的一种,非特殊情况不用考虑这种存储引擎。

当数据列的计算过程由于下推而出现异常时,可通过黑名单功能禁止其下推来快速恢复业务。具体而言,你可以将数据列类型加入黑名单 `mysql.expr_pushdown_blacklist` 中,以禁止列下推, 目前仅支持 `ENUM` 和 `BIT`。

```sql
mysql> insert into mysql.expr_pushdown_blacklist values('bit', 'tikv','');
Query OK, 1 row affected (0.01 sec)
```

### 加入黑名单

执行以下步骤,可将一个或多个函数或运算符加入黑名单:
Expand Down