You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MATERIALIZED columns cannot be used in JOINs #3140
create table test1(col UInt64, testCol UInt64 MATERIALIZED col) Engine=MergeTree partition by tuple() order by tuple();
insert into test1 values (1),(2),(3),(4),(5);
create table test2(testCol UInt64) Engine=MergeTree partition by tuple() order by tuple();
insert into test2 values (1),(2),(3),(4),(5);
SELECT COUNT()
FROM test2
ANY INNER JOIN test1 USING testCol;
Received exception from server (version 18.10.3):
Code: 10. DB::Exception: Received from localhost:9000, 127.0.0.1. DB::Exception: Not found column testCol in block. There are only columns: .
I've tried to implement a simple solution and it's not working. To much places to change.
It's probably better to fix it with #4219: attach a hidden column with alias into select list and remove it from output.
droptable if exists test1;
droptable if exists test2;
createtabletest1(col UInt64, testCol UInt64 alias col)
Engine=MergeTree partition by tuple() order by tuple();
insert into test1 (col) values (1),(2),(3),(4),(5);
createtabletest2(testCol UInt64)
Engine=MergeTree partition by tuple() order by tuple();
insert into test2 values (1),(2),(3),(4),(5);
SELECTCOUNT()
FROM test2 ANY INNER JOIN test1 USING testCol;
Received exception from server (version 19.4.0):
Code: 10. DB::Exception: Received from localhost:9000, ::1. DB::Exception: Not found column
test1.testCol in block. There are only columns: col.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Activity
4ertus2 commentedon Aug 30, 2019
I've tried to implement a simple solution and it's not working. To much places to change.
It's probably better to fix it with #4219: attach a hidden column with alias into select list and remove it from output.
ilyas-pro commentedon Sep 11, 2019
The same situation with "alias" columns:
stale commentedon Oct 26, 2019
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
KochetovNicolai commentedon Nov 26, 2019
#7911 does not fix it, exception is in
DB::Join::setSampleBlock