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

DB::Exception: Wrong precision:128 #3091

Closed
fzhedu opened this issue Sep 15, 2021 · 0 comments · Fixed by pingcap/tidb#28466
Closed

DB::Exception: Wrong precision:128 #3091

fzhedu opened this issue Sep 15, 2021 · 0 comments · Fixed by pingcap/tidb#28466
Assignees
Labels
plan bugs related to plans severity/moderate type/bug The issue is confirmed as a bug.

Comments

@fzhedu
Copy link
Contributor

fzhedu commented Sep 15, 2021

create table t (c_create_time varchar(128));
alter table t set tiflash replica 1;
set @@tidb_isolation_read_engines='tiflash,tidb'; set @@tidb_allow_mpp=1; set @@tidb_enforce_mpp=1;

mysql> SELECT FROM_UNIXTIME(c_create_time,'%Y-%m-%d')  FROM t;
ERROR 1105 (HY000): DB::Exception: Wrong precision:128

mysql> desc SELECT FROM_UNIXTIME(c_create_time,'%Y-%m-%d')  FROM t;
+---------------------------+----------+--------------+---------------+--------------------------------------------------------------------------------------+
| id                        | estRows  | task         | access object | operator info                                                                        |
+---------------------------+----------+--------------+---------------+--------------------------------------------------------------------------------------+
| TableReader_9             | 10000.00 | root         |               | data:ExchangeSender_8                                                                |
| └─ExchangeSender_8        | 10000.00 | cop[tiflash] |               | ExchangeType: PassThrough                                                            |
|   └─Projection_4          | 10000.00 | cop[tiflash] |               | from_unixtime(cast(test.t.c_create_time, decimal(128,0) BINARY), %Y-%m-%d)->Column#3 |
|     └─TableFullScan_7     | 10000.00 | cop[tiflash] | table:t       | keep order:false, stats:pseudo                                                       |
+---------------------------+----------+--------------+---------------+--------------------------------------------------------------------------------------+
4 rows in set (0.00 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plan bugs related to plans severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants