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

23.1 PREWHERE is disabled for non-identical Merge tables #46286

Closed
SaltTan opened this issue Feb 10, 2023 · 0 comments · Fixed by #46454
Closed

23.1 PREWHERE is disabled for non-identical Merge tables #46286

SaltTan opened this issue Feb 10, 2023 · 0 comments · Fixed by #46454

Comments

@SaltTan
Copy link
Contributor

SaltTan commented Feb 10, 2023

I am very upset by your decision to disable PREWHERE for Merge tables in case data types do not match for some of the columns in the underlying tables (#44716).

Here is my use-case that doesn't work anymore:

create table default.t1 (key Int32, value Int32) engine=MergeTree order by key;
create table default.t2 (key Int32, value Int64) engine=MergeTree order by key;
create table default.t (key Int32, value Int32) engine=Merge(default,'^t.$');

insert into t1 values (1,1);
insert into t2 values (2,2);

select * from t prewhere key=1;

Code: 182. DB::Exception: Cannot use PREWHERE with table t, probably some columns don't have same type or an underlying table doesn't support PREWHERE. (ILLEGAL_PREWHERE) (version 23.1.3.5 (official build))

As you can see the data type for the column participating in the filter is the same in all tables, but PREWHERE is disabled anyway.
I run ClickHouse for many years and some of my tables are so old they are created with the old syntax. I use Merge tables to avoid changing old tables and migrating data. I'm very upset that I can't continue doing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant