Skip to content

issue with nested CTE + Distributed + IN subquery  #23865

Closed

Description

@filimonov
create table table_local engine = Log AS select * from numbers(10);

create table table_dist engine = Distributed('test_cluster_two_shards',default,table_local) AS table_local;

with
 x as (select number from numbers(10) where number % 3=0),
 y as ( 
     select number, count() from table_dist
     where number in (select * from x) group by number
)
  select * from y;
  
Received exception from server (version 21.4.6):
Code: 60. DB::Exception: Received from localhost:9000. DB::Exception: Received from 127.0.0.2:9000. DB::Exception: Table default.x doesn't exist: While processing number IN ((SELECT * FROM x) AS _subquery10). 

/cc @amosbird

Activity

  1. added
    bug
    comp-query-analyzer
    unexpected behaviour
    and removed
    bug
    on May 3, 2021
  2. self-assigned this
    on May 4, 2021
  3. amosbird commented on May 11, 2021

    @amosbird
    Collaborator

    It works in master.

  4. DipalPrajapati commented on Jul 29, 2021

    @DipalPrajapati

    Hi , did it work for you @filimonov ? I am facing the same issue.

  5. DenisGee commented on May 5, 2023

    @DenisGee

    +1 what about the problem? =)

  6. removed their assignment
    on Jul 20, 2023
  7. h1k commented on Aug 16, 2023

    @h1k

    Is this problem solved now? This problem can also be reproduced in v23.3.8.21-lts. In cluster mode, this problem can be reproduced when multiple servers and shards are deployed. This problem does not occur when only one server is used and multiple shards are configured. The test cases are the same as those in #29748

  8. added a commit that references this issue on Apr 11, 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-query-analyzerunexpected behaviour

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions