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

SubstringUTF8 & RightUTF8 do not support length of integer types other than int64/uint64 #9473

Closed
gengliqi opened this issue Sep 26, 2024 · 1 comment · Fixed by #9507
Closed
Labels
affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. component/compute report/customer Customers have encountered this bug. severity/major type/bug The issue is confirmed as a bug.

Comments

@gengliqi
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> CREATE TABLE `t` ( `id`varchar(20), `lgth`tinyint(10) );
Query OK, 0 rows affected (0.04 sec)

mysql> alter table t set tiflash replica 1;
Query OK, 0 rows affected (0.08 sec)

mysql> explain select left(id, lgth) from t;
+----------------------------+----------+--------------+---------------+----------------------------------------+
| id                         | estRows  | task         | access object | operator info                          |
+----------------------------+----------+--------------+---------------+----------------------------------------+
| TableReader_12             | 10000.00 | root         |               | MppVersion: 2, data:ExchangeSender_11  |
| └─ExchangeSender_11        | 10000.00 | mpp[tiflash] |               | ExchangeType: PassThrough              |
|   └─Projection_4           | 10000.00 | mpp[tiflash] |               | left(test.t.id, test.t.lgth)->Column#4 |
|     └─TableFullScan_10     | 10000.00 | mpp[tiflash] | table:t       | keep order:false, stats:pseudo         |
+----------------------------+----------+--------------+---------------+----------------------------------------+
4 rows in set, 1 warning (0.01 sec)

mysql> show warnings;
+---------+------+---------------------------------------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                                                             |
+---------+------+---------------------------------------------------------------------------------------------------------------------+
| Warning | 1105 | Scalar function 'left'(signature: LeftUTF8, return type: var_string(20)) is not supported to push down to tikv now. |
+---------+------+---------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> explain analyze select left(id, lgth) from t;
ERROR 1105 (HY000): other error for mpp stream: Code: 0, e.displayText() = DB::Exception: 3nd argument of function substringUTF8 must have UInt/Int type., e.what() = DB::Exception,

2. What did you expect to see? (Required)

No error.

3. What did you see instead (Required)

Error.

4. What is your TiFlash version? (Required)

master

@gengliqi gengliqi added the type/bug The issue is confirmed as a bug. label Sep 26, 2024
@gengliqi gengliqi changed the title SubstringUTF8 only support int64/uint64 length SubstringUTF8 does not support length of integer types other than int64/uint64 Sep 26, 2024
@jebter jebter added affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. labels Oct 9, 2024
@gengliqi gengliqi added affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.1 This bug affects the 6.1.x(LTS) versions. and removed may-affects-5.4 may-affects-6.1 labels Oct 10, 2024
@gengliqi gengliqi changed the title SubstringUTF8 does not support length of integer types other than int64/uint64 SubstringUTF8 & Right do not support length of integer types other than int64/uint64 Oct 10, 2024
@gengliqi gengliqi changed the title SubstringUTF8 & Right do not support length of integer types other than int64/uint64 SubstringUTF8 & RightUTF8 do not support length of integer types other than int64/uint64 Oct 10, 2024
@ti-chi-bot ti-chi-bot bot closed this as completed in 9f85bb2 Oct 10, 2024
@seiya-annie
Copy link

/report customer

@ti-chi-bot ti-chi-bot bot added the report/customer Customers have encountered this bug. label Oct 14, 2024
ti-chi-bot bot pushed a commit that referenced this issue Nov 5, 2024
…9507) (#9513)

close #9473

Support other integer types for SubstringUTF8 & RightUTF8 functions

Signed-off-by: gengliqi <[email protected]>

Co-authored-by: Liqi Geng <[email protected]>
Co-authored-by: gengliqi <[email protected]>
ti-chi-bot bot pushed a commit that referenced this issue Dec 13, 2024
…9507) (#9514)

close #9473

Support other integer types for SubstringUTF8 & RightUTF8 functions

Signed-off-by: JaySon-Huang <[email protected]>

Co-authored-by: JaySon <[email protected]>
Co-authored-by: JaySon-Huang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. component/compute report/customer Customers have encountered this bug. severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants