Skip to content

Commit

Permalink
Update function list pushed down to tiflash (pingcap#6862)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanmato1984 authored Aug 16, 2021
1 parent fe32e80 commit b926272
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tiflash/use-tiflash.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,15 @@ TiFlash 支持部分算子的下推,支持的算子如下:
在 TiDB 中,算子之间会呈现树型组织结构。一个算子能下推到 TiFlash 的前提条件,是该算子的所有子算子都能下推到 TiFlash。因为大部分算子都包含有表达式计算,当且仅当一个算子所包含的所有表达式均支持下推到 TiFlash 时,该算子才有可能下推给 TiFlash。目前 TiFlash 支持下推的表达式包括:
* 数学函数:`+, -, /, *, >=, <=, =, !=, <, >, round(int), round(double), abs, floor(int), ceil(int), ceiling(int)`
* 逻辑函数:`and, or, not, case when, if, ifnull, isnull, in`
* 数学函数:`+, -, /, *, %, >=, <=, =, !=, <, >, round(int), round(double), round(decimal), abs, floor(int), ceil(int), ceiling(int), sqrt, log, log2, log10, ln, exp, pow, sign, radians, degrees, conv, crc32`
* 逻辑函数:`and, or, not, case when, if, ifnull, isnull, in, like, coalesce`
* 位运算:`bitand, bitor, bigneg, bitxor`
* 字符串函数:`substr, char_length, replace, concat, concat_ws, left, right`
* 日期函数:`date_format, timestampdiff, from_unixtime, unix_timestamp(int), unix_timestamp(decimal), str_to_date(date), str_to_date(datetime), date_add(string, int), date_add(datetime, int), date_sub(datetime, int), date_sub(string, int), datediff, year, month, day, extract(datetime)`
* 字符串函数:`substr, char_length, replace, concat, concat_ws, left, right, ascii, length, trim, position`
* 日期函数:`date_format, timestampdiff, from_unixtime, unix_timestamp(int), unix_timestamp(decimal), str_to_date(date), str_to_date(datetime), date_add(datetime, int), date_add(string, int), date_add(string, real), date_sub(datetime, int), date_sub(string, int), datediff, year, month, day, extract(datetime), date`
* JSON 函数:`json_length`
* 转换函数:`cast(int as double), cast(int as decimal), cast(int as string), cast(int as time), cast(double as int), cast(double as decimal), cast(double as string), cast(double as time), cast(string as int), cast(string as double), cast(string as decimal), cast(string as time), cast(decimal as int), cast(decimal as string), cast(decimal as time), cast(time as int), cast(time as decimal), cast(time as string)`
* 聚合函数:`min, max, sum, count, avg, approx_count_distinct`
* 其他函数:`inetntoa, inetaton, inet6ntoa, inet6aton`
其中,`cast` 和 `date_add` 的下推默认不开启,若需要手动开启,请参考[优化规则及表达式下推的黑名单](/blocklist-control-plan.md)
Expand Down

0 comments on commit b926272

Please sign in to comment.