ClickHouse/tests/queries/0_stateless/00816_join_column_names_sarg.sql

22 lines
798 B
MySQL
Raw Normal View History

2019-06-03 17:36:27 +00:00
drop table if exists t1_00816;
drop table if exists t2_00816;
create table t1_00816 (a Int8, val Float32) engine=Memory();
create table t2_00816 (a Int8, val Float32) engine=Memory();
2018-12-30 03:14:16 +00:00
2019-06-03 17:36:27 +00:00
INSERT INTO t1_00816 VALUES (1, 123);
INSERT INTO t2_00816 VALUES (1, 456);
2018-12-30 03:14:16 +00:00
2019-06-03 17:36:27 +00:00
select t1_00816.a, t2_00816.a from t1_00816 all inner join t2_00816 on t1_00816.a=t2_00816.a;
2018-12-30 03:14:16 +00:00
-- Received exception from server (version 18.14.1):
2019-06-03 17:36:27 +00:00
-- Code: 47. DB::Exception: Received from localhost:9000, 127.0.0.1. DB::Exception: Unknown identifier: t2_00816.a.
2018-12-30 03:14:16 +00:00
-- this query works fine
2019-06-03 17:36:27 +00:00
select t1_00816.a, t2_00816.* from t1_00816 all inner join t2_00816 on t1_00816.a=t2_00816.a;
2018-12-30 03:14:16 +00:00
-- and this
2019-06-03 17:36:27 +00:00
select t1_00816.a, t2_00816.val from t1_00816 all inner join t2_00816 on t1_00816.a=t2_00816.a;
2018-12-30 03:14:16 +00:00
2019-06-03 17:36:27 +00:00
DROP TABLE t1_00816;
DROP TABLE t2_00816;