Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel replicas and join throw error 'expected to process query to fetch columns stage. Actual WithMergeableState' #63984

Open
vdimir opened this issue May 16, 2024 · 0 comments
Labels
analyzer Issues and pull-requests related to new analyzer bug Confirmed user-visible misbehaviour in official release comp-parallel-replicas Parallel reading from replicas

Comments

@vdimir
Copy link
Member

vdimir commented May 16, 2024

It's happening when the left table is any non-MergeTree engine, and parallel replicas are applied to the right table.

Steps to reproduce:

https://pastila.nl/?071fe961/348bfa8907696c4c33158b439882c5c0#yhmcsIe8T/lJjbjeT7EgNg==

It yields two plans to join:

left plan:
Expression (Change column names to column identifiers)
Header: __table1.id Int32
Actions: INPUT : 0 -> id Int32 : 0
         ALIAS id :: 0 -> __table1.id Int32 : 1
Positions: 1
  ReadFromMemoryStorage
  Header: id Int32

right plan:
ReadFromRemoteParallelReplicas (query: SELECT `__table1`.`id` AS `id`, `__table2`.`id` AS `b.id` FROM `default`.`xxx` AS `__table1` ALL INNER JOIN `default`.`ttt` AS `__table2` ON `__table1`.`id` = `__table2`.`id`, Replica: 127.0.0.1, Replica: 127.0.0.2, Replica: 127.0.0.3, Replica: 127.0.0.4, Replica: 127.0.0.5, Replica: 127.0.0.6, Replica: 127.0.0.7, Replica: 127.0.0.8, Replica: 127.0.0.9, Replica: 127.0.0.10, Replica: 127.0.0.11)
Header: __table1.id Int32
        __table2.id Int32

The plan for the right side has from_stage = WithMergeableState, and moreover, it seems like it is already a joined plan that has two columns for some reason.

@vdimir vdimir added comp-parallel-replicas Parallel reading from replicas analyzer Issues and pull-requests related to new analyzer labels May 16, 2024
@novikd novikd added the bug Confirmed user-visible misbehaviour in official release label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer Issues and pull-requests related to new analyzer bug Confirmed user-visible misbehaviour in official release comp-parallel-replicas Parallel reading from replicas
Projects
None yet
Development

No branches or pull requests

2 participants