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

[Bug] upgrade from 1.2 to 2.0, decimal failed #36493

Closed
2 of 3 tasks
cambyzju opened this issue Jun 18, 2024 · 0 comments
Closed
2 of 3 tasks

[Bug] upgrade from 1.2 to 2.0, decimal failed #36493

cambyzju opened this issue Jun 18, 2024 · 0 comments

Comments

@cambyzju
Copy link
Contributor

cambyzju commented Jun 18, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

Version

2.0 latest

What's Wrong?

set experimental_enable_nereids_planner=false;

> select uniq_a.k1 from uniq_a left join uniq_b on uniq_a.k1 = uniq_b.k1 group by uniq_a.k1 having sum(uniq_b.v1) <> sum(uniq_a.v1);
ERROR 1105 (HY000): errCode = 2, detailMessage = (127.0.0.1)[NOT_IMPLEMENTED_ERROR]Create Expr failed because [E3] Wrong precision 39, min: 1, max: 38

What You Expected?

no error

How to Reproduce?

1、create table uniq_a with decimalv2 column (this is the old table come from v1.2):

admin set frontend config ("disable_decimalv2"="false");
admin set frontend config ("enable_decimal_conversion"="false");
create table uniq_a(k1 int, v1 decimal(15,4)) unique key(k1) DISTRIBUTED by hash(k1) buckets 1 properties("replication_num"="1");  

2、create table uniq_b with decimalv3 column:

admin set frontend config ("disable_decimalv2"="true");
admin set frontend config ("enable_decimal_conversion"="true");
create table uniq_b(k1 int, v1 decimal(27,8)) unique key(k1) DISTRIBUTED by hash(k1) buckets 1 properties("replication_num"="1");  

3、add some data:

insert into uniq_a values(1, '1.2345');  
insert into uniq_b values(1, '1.2345');  

4、query using hiving + sum:

set experimental_enable_nereids_planner=false;
select uniq_a.k1 from uniq_a left join uniq_b on uniq_a.k1 = uniq_b.k1 group by uniq_a.k1 having sum(uniq_b.v1) <> sum(uniq_a.v1);

then we got the error message:
ERROR 1105 (HY000): errCode = 2, detailMessage = (127.0.0.1)[NOT_IMPLEMENTED_ERROR]Create Expr failed because [E3] Wrong precision 39, min: 1, max: 38

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant