heavyai / heavydb

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

[Crash Bug] SELECT <column> FROM <table> JOIN <table> ON FALSE Brings Errors #810

Open qwebug opened 1 year ago

qwebug commented 1 year ago

Describe:

HeavyDB will crash when using SELECT \ FROM \

JOIN \
ON FALSE, after SET EXECUTOR_DEVICE='GPU'.

SQL:

ALTER SESSION SET EXECUTOR_DEVICE='GPU';
CREATE TABLE t0(c0 INT);
CREATE TABLE t1(c0 INT);
SELECT t0.c0 FROM t0 JOIN t1 ON FALSE;

Result:

2023-10-02T11:17:11.259999 F 25 11 9 RelAlgOptimizer.cpp:1649 Check failed: literal->getType() == kBOOLEAN && literal->getVal<bool>()
Stack trace:
hoist_filter_cond_to_cross_join
RelAlgDagBuilder::optimizeDag
RelAlgDagBuilder::build
RelAlgDagBuilder::buildDag
DBHandler::execute_rel_alg
QueryDispatchQueue::worker
clone
/opt/heavyai/scripts/innerstartheavy: line 180:    25 Aborted                 (core dumped) ./bin/heavydb $MAPD_DATA $RO --port $MAPD_TCP_PORT --http-port $MAPD_HTTP_PORT --calcite-port $MAPD_CALCITE_PORT $CONFIG $VERBOSE $*
startheavy 9 exited

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

cdessanti commented 1 year ago

Hi, thanks for pointing us to this bug.

I have expanded a little the test cases and opended an internal ticket.