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

[GPU Logic Bug] SELECT DISTINCT <column> FROM <table> ORDER BY 1 DESC LIMIT 10 Brings Errors #805

Open
qwebug opened this issue Oct 2, 2023 · 0 comments

Comments

@qwebug
Copy link

qwebug commented Oct 2, 2023

Describe:

Using SELECT DISTINCT <column> FROM <table> ORDER BY 1 DESC LIMIT 10 brings different results , when set EXECUTOR_DEVICE 'CPU' and 'GPU'.

SQL:

CREATE TABLE t0(c0 INT, c1 DOUBLE, SHARD KEY(c0)) WITH (shard_count=662);
CREATE TABLE t1(c0 DECIMAL(2)  NULL, c1 FLOAT );
INSERT INTO t0 VALUES(0,0),(-25151,null),(4115,-62),(4165,62),(-16256,null),(-115,-62),(11215,62);
INSERT INTO t1 VALUES(1, 0.71818817),(0, -3.896708E7), (1, 0.9509316), (1, 8.043511E8),(1, 0.585598),(1,null),(null,9.1319142E8);
ALTER SESSION SET EXECUTOR_DEVICE='CPU';
SELECT DISTINCT t0.c0,t1.c1 FROM t0, t1  ORDER BY 1 desc limit 10;

Result:

c0|c1
11215|9.131914e+08
11215|0.585598
11215|0.7181882
11215|-3.896708e+07
11215|8.043511e+08
11215|NULL
11215|0.9509316
4165|9.131914e+08
4165|0.7181882
4165|NULL

SQL:

ALTER SESSION SET EXECUTOR_DEVICE='GPU'
SELECT DISTINCT t0.c0,t1.c1 FROM t0, t1  ORDER BY 1 desc limit 10;

Result:

c0|c1
4165|-3.896708e+07
4165|0.7181882
4165|0.9509316
4165|8.043511e+08
4115|0.9509316
4115|8.043511e+08
4115|NULL
4115|0.7181882
4115|0.585598
4115|9.131914e+08

Environment:

Docker Deployment

https://hub.docker.com/layers/heavyai/heavyai-ee-cuda/latest/images/sha256-5af3ad3a00cbc5ce09c299b8b81cda96521a27373dbb1e59209c02358cfd9b1f?context=explore

Docker DIGEST: sha256:5af3ad3a00cbc5ce09c299b8b81cda96521a27373dbb1e59209c02358cfd9b1f

HeavyDB Version: 7.1.0-20230821-eae9ec17da

HeavyDB license: Free Edition

@qwebug qwebug changed the title [Login Bug] SELECT DISTINCT <column> FROM <table> ORDER BY 1 DESC LIMIT 10 Brings Errors [Logic Bug] SELECT DISTINCT <column> FROM <table> ORDER BY 1 DESC LIMIT 10 Brings Errors Oct 6, 2023
@qwebug qwebug changed the title [Logic Bug] SELECT DISTINCT <column> FROM <table> ORDER BY 1 DESC LIMIT 10 Brings Errors [GPU Logic Bug] SELECT DISTINCT <column> FROM <table> ORDER BY 1 DESC LIMIT 10 Brings Errors Jan 22, 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

1 participant