Skip to content

Multiple JOIN does not support PREWHERE #4596

Closed

Description

@den-crane

19.3.4.15

CREATE TABLE a1 ( ANIMAL Nullable(String) ) engine = MergeTree order by tuple();
insert into a1 values('CROCO');

select count() 
     from a1 a 
      join a1 b on (a.ANIMAL = b.ANIMAL) 
      join a1 c on (c.ANIMAL = b.ANIMAL) 
where a.ANIMAL = 'CROCO'
┌─count()─┐
│       1 │
└─────────┘

select count() 
     from a1 a   
     join a1 b on (a.ANIMAL = b.ANIMAL) 
     join a1 c on (c.ANIMAL = b.ANIMAL) 
prewhere a.ANIMAL = 'CROCO'

Received exception from server (version 19.3.4):
Code: 182. DB::Exception: Received from localhost:9000, ::1. DB::Exception: Illegal PREWHERE.

Activity

  1. added
    bug
    on Mar 5, 2019
  2. added and removed
    bug
    on Mar 5, 2019
  3. 4ertus2 commented on Mar 5, 2019

    @4ertus2
    Contributor

    It probably needs push down for prewere section.

  4. self-assigned this
    on Mar 5, 2019
  5. added
    comp-joins
    on May 11, 2019
  6. removed their assignment
    on Oct 16, 2020
  7. tahayk commented on Oct 12, 2021

    @tahayk

    any update on this please ?

  8. esbenkolsbjerg commented on Oct 13, 2022

    @esbenkolsbjerg

    Also very interested in this feature

  9. sbulatnikov commented on Jan 9, 2023

    @sbulatnikov

    Still waiting...

  10. alexey-milovidov commented on Jan 9, 2023

    @alexey-milovidov
    Member

    This task is blocked by enabling of Analyzer #42648

  11. tybirk-accuranker commented on Jan 31, 2024

    @tybirk-accuranker

    Still blocked?

  12. added a commit that references this issue on Apr 10, 2024
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

    comp-joinsfeature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions