From 785b4aff8c98a8d315ff8921fb234591dcbc759f Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Thu, 26 Aug 2021 15:04:06 +0800 Subject: [PATCH 1/5] This is an automated cherry-pick of #6188 Signed-off-by: ti-chi-bot --- tiflash/use-tiflash.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tiflash/use-tiflash.md b/tiflash/use-tiflash.md index 7c1bb7157e828..e6b1ed7f2e8d9 100644 --- a/tiflash/use-tiflash.md +++ b/tiflash/use-tiflash.md @@ -240,14 +240,17 @@ Currently, TiFlash supports the following push-down expressions: * Mathematical functions: `+, -, /, *, >=, <=, =, !=, <, >, round(int), round(double), abs, floor(int), ceil(int), ceiling(int)` * Logical functions: `and, or, not, case when, if, ifnull, isnull, in` * Bitwise operations: `bitand, bitor, bigneg, bitxor` +<<<<<<< HEAD * String functions: `substr, char_length, replace, concat, concat_ws, left, right` * Date functions: `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)` +======= +* String functions: `substr, char_length, replace, concat, concat_ws, left, right, ascii, length, trim, position` +* Date functions: `date_format, timestampdiff, from_unixtime, unix_timestamp(int), unix_timestamp(decimal), str_to_date(date), str_to_date(datetime), datediff, year, month, day, extract(datetime), date` +>>>>>>> 36ef0f5a0 (tiflash: Remove the description about expr_blacklist in use_tiflash.md (#6188)) * JSON function: `json_length` * Conversion functions: `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)` * Aggregate functions: `min, max, sum, count, avg, approx_count_distinct` -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). - In addition, expressions that contain the Time/Bit/Set/Enum/Geometry type cannot be pushed down to TiFlash. If a query encounters unsupported push-down calculations, TiDB needs to complete the remaining calculations, which might greatly affect the TiFlash acceleration effect. The currently unsupported operators and expressions might be supported in future versions. From ab568e22be9d67f0be5b416798aee4830038b376 Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Mon, 30 Aug 2021 13:06:53 +0800 Subject: [PATCH 2/5] Update tiflash/use-tiflash.md --- tiflash/use-tiflash.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tiflash/use-tiflash.md b/tiflash/use-tiflash.md index e6b1ed7f2e8d9..f2999c5fa017c 100644 --- a/tiflash/use-tiflash.md +++ b/tiflash/use-tiflash.md @@ -240,10 +240,6 @@ Currently, TiFlash supports the following push-down expressions: * Mathematical functions: `+, -, /, *, >=, <=, =, !=, <, >, round(int), round(double), abs, floor(int), ceil(int), ceiling(int)` * Logical functions: `and, or, not, case when, if, ifnull, isnull, in` * Bitwise operations: `bitand, bitor, bigneg, bitxor` -<<<<<<< HEAD -* String functions: `substr, char_length, replace, concat, concat_ws, left, right` -* Date functions: `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)` -======= * String functions: `substr, char_length, replace, concat, concat_ws, left, right, ascii, length, trim, position` * Date functions: `date_format, timestampdiff, from_unixtime, unix_timestamp(int), unix_timestamp(decimal), str_to_date(date), str_to_date(datetime), datediff, year, month, day, extract(datetime), date` >>>>>>> 36ef0f5a0 (tiflash: Remove the description about expr_blacklist in use_tiflash.md (#6188)) From 8be6e9fafb5d01e6bb5380734856a7b3a68cf1a3 Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Mon, 30 Aug 2021 13:07:39 +0800 Subject: [PATCH 3/5] Update tiflash/use-tiflash.md --- tiflash/use-tiflash.md | 1 - 1 file changed, 1 deletion(-) diff --git a/tiflash/use-tiflash.md b/tiflash/use-tiflash.md index f2999c5fa017c..319f18ea0b184 100644 --- a/tiflash/use-tiflash.md +++ b/tiflash/use-tiflash.md @@ -242,7 +242,6 @@ Currently, TiFlash supports the following push-down expressions: * Bitwise operations: `bitand, bitor, bigneg, bitxor` * String functions: `substr, char_length, replace, concat, concat_ws, left, right, ascii, length, trim, position` * Date functions: `date_format, timestampdiff, from_unixtime, unix_timestamp(int), unix_timestamp(decimal), str_to_date(date), str_to_date(datetime), datediff, year, month, day, extract(datetime), date` ->>>>>>> 36ef0f5a0 (tiflash: Remove the description about expr_blacklist in use_tiflash.md (#6188)) * JSON function: `json_length` * Conversion functions: `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)` * Aggregate functions: `min, max, sum, count, avg, approx_count_distinct` From 4d509509fd948cfd2522bc486d9d33c53f7eea9e Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Mon, 30 Aug 2021 13:08:19 +0800 Subject: [PATCH 4/5] Update tiflash/use-tiflash.md --- tiflash/use-tiflash.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiflash/use-tiflash.md b/tiflash/use-tiflash.md index 319f18ea0b184..fb27230d4ad20 100644 --- a/tiflash/use-tiflash.md +++ b/tiflash/use-tiflash.md @@ -240,7 +240,7 @@ Currently, TiFlash supports the following push-down expressions: * Mathematical functions: `+, -, /, *, >=, <=, =, !=, <, >, round(int), round(double), abs, floor(int), ceil(int), ceiling(int)` * Logical functions: `and, or, not, case when, if, ifnull, isnull, in` * Bitwise operations: `bitand, bitor, bigneg, bitxor` -* String functions: `substr, char_length, replace, concat, concat_ws, left, right, ascii, length, trim, position` +* String functions: `substr, char_length, replace, concat, concat_ws, left, right` * Date functions: `date_format, timestampdiff, from_unixtime, unix_timestamp(int), unix_timestamp(decimal), str_to_date(date), str_to_date(datetime), datediff, year, month, day, extract(datetime), date` * JSON function: `json_length` * Conversion functions: `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)` From fe544e2c06ecf8ece349e8d5ef22c80a55c5cd4c Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Mon, 30 Aug 2021 13:08:46 +0800 Subject: [PATCH 5/5] Update tiflash/use-tiflash.md --- tiflash/use-tiflash.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiflash/use-tiflash.md b/tiflash/use-tiflash.md index fb27230d4ad20..8cefa5c7a33cd 100644 --- a/tiflash/use-tiflash.md +++ b/tiflash/use-tiflash.md @@ -241,7 +241,7 @@ Currently, TiFlash supports the following push-down expressions: * Logical functions: `and, or, not, case when, if, ifnull, isnull, in` * Bitwise operations: `bitand, bitor, bigneg, bitxor` * String functions: `substr, char_length, replace, concat, concat_ws, left, right` -* Date functions: `date_format, timestampdiff, from_unixtime, unix_timestamp(int), unix_timestamp(decimal), str_to_date(date), str_to_date(datetime), datediff, year, month, day, extract(datetime), date` +* Date functions: `date_format, timestampdiff, from_unixtime, unix_timestamp(int), unix_timestamp(decimal), str_to_date(date), str_to_date(datetime), datediff, year, month, day, extract(datetime)` * JSON function: `json_length` * Conversion functions: `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)` * Aggregate functions: `min, max, sum, count, avg, approx_count_distinct`