heavyai / heavydb

HeavyDB (formerly OmniSciDB)
https://heavy.ai
Apache License 2.0
2.96k stars 448 forks source link

[GPU Logic Bug] SELECT <agg_func> FROM <table> Brings Errors #833

Open qwebug opened 5 months ago

qwebug commented 5 months ago

Describe:

SELECT \ FROM \

brings different results, when using CPU-only configurations and GPU-used configurations.

SQL with CPU-only Config:

CREATE TABLE t0(c0 DOUBLE);
INSERT INTO t0(c0) VALUES('Infinity');
ALTER SESSION SET EXECUTOR_DEVICE='CPU';
SELECT SUM(CAST(t0.c0 AS INT)) FROM t0;

Result:

EXPR$0
NULL

SQL with GPU-used Config:

ALTER SESSION SET EXECUTOR_DEVICE='GPU';
SELECT SUM(CAST(t0.c0 AS INT)) FROM t0;

Result:

EXPR$0
2147483647

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 commented 5 months ago

This problem came up at HeavyDB Version: 7.1.0-20230821-eae9ec17da (Docker: https://hub.docker.com/layers/heavyai/heavyai-ee-cuda/v7.1.0/images/sha256-5af3ad3a00cbc5ce09c299b8b81cda96521a27373dbb1e59209c02358cfd9b1f?context=explore ) . And it has been fixed at HeavyDB Version: 7.2.6 (Docker: https://hub.docker.com/layers/heavyai/heavyai-ee-cuda/v7.2.6/images/sha256-d67d20fc9cf50437169cecce8a0180200418ba732ce25f2a05094eac776560be?context=explore), after my verification. Thanks to the developers for their contributions.