apache/horaedb

Queries involving multiple tables will fail in a cluster environment

Opened this issue · 1 comments

Describe this problem

Queries involving multiple tables fail to find table in a cluster environment.

Server version

commit 0970b03

Steps to reproduce

CREATE TABLE `t1` (`timestamp` timestamp NOT NULL, `value` int, `name` string, timestamp KEY (timestamp)) ENGINE=Analytic WITH(  enable_ttl='false' );
Query OK, 0 rows affected (0.05 sec)

CREATE TABLE `t2` (`timestamp` timestamp NOT NULL, `value` int, `name` string, timestamp KEY (timestamp)) ENGINE=Analytic WITH(  enable_ttl='false' );
Query OK, 0 rows affected (0.04 sec)

CREATE TABLE `t3` ( `timestamp` timestamp NOT NULL, `value` int, `name` string, timestamp KEY (timestamp)) ENGINE=Analytic WITH(  enable_ttl='false' );
Query OK, 0 rows affected (0.06 sec)

SELECT * FROM `t1`, `t2`, `t3`;
ERROR 1105 (HY000): Failed to handle sql:SELECT * FROM `t1`, `t2`, `t3`, err:Rpc error, code:500, message:Failed to create plan, err:Failed to create plan, err:Failed to generate datafusion plan, err:Execution error: Table is not found, "table:t3"

Expected behavior

No error

Additional Information

Use the same config as the integration test.

Cannot be 100% replicated, possibly due to the randomness of shard allocation?

Cannot be 100% replicated, possibly due to the randomness of shard allocation?

Yes, currently tables included in one query should be on same instance(an instance may have many shards).