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] The second parameter of the Radom function being a variable can cause the BE node to crash #41454

Open
2 of 3 tasks
huligong1234 opened this issue Sep 29, 2024 · 1 comment

Comments

@huligong1234
Copy link

Search before asking

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

Version

2.1.5

What's Wrong?

CentOS7.9/openEuler-22.03, Doris2.1.5,
The second parameter of the Radom function being a variable can cause the BE node to crash.

Can be reproduced 100%

image

What You Expected?

Fix it

How to Reproduce?

CREATE TABLE `t_1` (
  `code` VARCHAR(36) NULL
) ENGINE=OLAP
DUPLICATE KEY(`code`)
DISTRIBUTED BY HASH(`code`) BUCKETS 1
PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);

CREATE TABLE `t_2` (
  `code` VARCHAR(36) NULL
) ENGINE=OLAP
DUPLICATE KEY(`code`)
DISTRIBUTED BY HASH(`code`) BUCKETS 1
PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);

insert into t_1(`code`) values('100');
insert into t_1(`code`) values('200');
insert into t_1(`code`) values('300');

insert into t_2(`code`) values('1');
insert into t_2(`code`) values('101');
insert into t_2(`code`) values('951744758986133504');

SELECT random(1,randnum) AS vnum,m.* 
FROM (select * from t_2) m 
LEFT JOIN (SELECT count(1) as randnum,code from t_1 GROUP BY code) d ON m.code=d.code;

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@wyxxxcat
Copy link
Contributor

fix at #39255

@github-staff github-staff deleted a comment Sep 29, 2024
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

2 participants