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

Fix compatibility with ClickHouse without allow_experimental_analyzer=1 #66

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

azat
Copy link
Owner

@azat azat commented Jul 5, 2024

ClickHouse without allow_experimental_analyzer returns name of the subquery with the key when you have > 2 subqueries (odd):

This is for 21.2:

select a.*, b.*, c.* from (select * from system.one) as a, (select dummy as x from system.one) as b, (select dummy as y from system.one) as c
┌─a.dummy─┬─b.x─┬─c.y─┐
│       0 │   0 │   0 │
└─────────┴─────┴─────┘

select a.*, b.* from (select * from system.one) as a, (select dummy as x from system.one) as b
┌─dummy─┬─x─┐
│     0 │ 0 │
└───────┴───┘

24.7 upstream:

select a.*, b.*, c.* from (select * from system.one) as a, (select dummy as x from system.one) as b, (select dummy as y from system.one) as c
┌─a.dummy─┬─b.x─┬─c.y─┐
│       0 │   0 │   0 │
└─────────┴─────┴─────┘

select a.*, b.*, c.* from (select * from system.one) as a, (select dummy as x from system.one) as b, (select dummy as y from system.one) as c settings allow_experimental_analyzer=0
┌─a.dummy─┬─b.x─┬─c.y─┐
│       0 │   0 │   0 │
└─────────┴─────┴─────┘

Fixes: 5e0d54b ("Add Inserted/Selected rows into summary")

ClickHouse without allow_experimental_analyzer returns name of the
subquery with the key when you have > 2 subqueries (odd):

This is for 21.2:

    select a.*, b.*, c.* from (select * from system.one) as a, (select dummy as x from system.one) as b, (select dummy as y from system.one) as c
    ┌─a.dummy─┬─b.x─┬─c.y─┐
    │       0 │   0 │   0 │
    └─────────┴─────┴─────┘

    select a.*, b.* from (select * from system.one) as a, (select dummy as x from system.one) as b
    ┌─dummy─┬─x─┐
    │     0 │ 0 │
    └───────┴───┘

24.7 upstream:

    select a.*, b.*, c.* from (select * from system.one) as a, (select dummy as x from system.one) as b, (select dummy as y from system.one) as c
    ┌─a.dummy─┬─b.x─┬─c.y─┐
    │       0 │   0 │   0 │
    └─────────┴─────┴─────┘

    select a.*, b.*, c.* from (select * from system.one) as a, (select dummy as x from system.one) as b, (select dummy as y from system.one) as c settings allow_experimental_analyzer=0
    ┌─a.dummy─┬─b.x─┬─c.y─┐
    │       0 │   0 │   0 │
    └─────────┴─────┴─────┘

Fixes: 5e0d54b ("Add Inserted/Selected rows into summary")
@azat azat force-pushed the fix-summary-non-analyzer branch from ec79bda to dea3135 Compare July 5, 2024 06:38
@azat azat merged commit dea3135 into main Jul 5, 2024
6 checks passed
@azat azat deleted the fix-summary-non-analyzer branch July 5, 2024 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant