Skip to content

Join Engine Not found column id_val_join.val in block #17710

Closed

Description

@yd1261137568

version:20.8.3.18
According to the official document join engine operation, the result is the following exception

CREATE TABLE id_val(id UInt32, val UInt32) ENGINE = TinyLog;

INSERT INTO id_val VALUES (1,11)(2,12)(3,13);

CREATE TABLE id_val_join(id UInt32, val UInt8) ENGINE = Join(ANY, LEFT, id);

INSERT INTO id_val_join VALUES (1,21)(1,22)(3,23);

SELECT * FROM id_val ANY LEFT JOIN id_val_join USING (id);

Exception: Not found column id_val_join.val in block. There are only columns: id, val (version 20.8.3.18)

Activity

  1. added
    bug
    on Dec 2, 2020
  2. yd1261137568 commented on Dec 2, 2020

    @yd1261137568
    Author

    SELECT * FROM id_val ANY LEFT JOIN id_val_join USING (id) SETTINGS join_use_nulls = 1;

    Exception: Table test.id_val_join needs the same join_use_nulls setting as present in LEFT or FULL JOIN

  3. Tasselmi commented on Jun 18, 2021

    @Tasselmi

    I got the same error , make me confused.

  4. Tasselmi commented on Jun 18, 2021

    @Tasselmi

    @alexey-milovidov WE NEED HELP. SOS.

    SELECT *
    FROM id_val
    ANY LEFT JOIN id_val_join USING (id)
    SETTINGS join_use_nulls = 0
    
    Query id: 5edb59e7-8efe-4f80-b1fd-d7c4eb8067d6
    
    
    0 rows in set. Elapsed: 0.001 sec.
    
    Received exception from server (version 21.3.4):
    Code: 264. DB::Exception: Received from 127.0.0.1:9000. DB::Exception: Table test.id_val_join (26c2a6e4-8722-4e04-b77a-e011ec0cbb17) needs the same join_use_nulls setting as present in LEFT or FULL JOIN..
    
    
    
    SELECT *
    FROM id_val
    ANY LEFT JOIN id_val_join USING (id)
    SETTINGS join_use_nulls = 1
    
    Query id: 85e6d868-8640-4a5a-bac2-1ff955803469
    
    
    0 rows in set. Elapsed: 0.002 sec.
    
    Received exception from server (version 21.3.4):
    Code: 8. DB::Exception: Received from 127.0.0.1:9000. DB::Exception: Cannot find column `id_val_join.val` in source stream.
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions