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

Unexpected exception when using final modifier with non MergeTree table #63960

Closed
alsugiliazova opened this issue May 16, 2024 · 1 comment · Fixed by #64037
Closed

Unexpected exception when using final modifier with non MergeTree table #63960

alsugiliazova opened this issue May 16, 2024 · 1 comment · Fixed by #64037
Assignees
Labels
analyzer Issues and pull-requests related to new analyzer bug Confirmed user-visible misbehaviour in official release

Comments

@alsugiliazova
Copy link

https://fiddle.clickhouse.com/2f3e3b06-468c-43d2-abc9-d92dbc990d05

CREATE TABLE users (uid Int16, name String, age Int16) ENGINE=Log;

CREATE TABLE IF NOT EXISTS distributed_table as users ENGINE = Distributed(default, currentDatabase(), users);

insert into distributed_table (age) values (1), (2), (3);

set final=1;
select count() from users;
select count() from distributed_table;
3

Received exception from server (version 24.3.3):
Code: 181. DB::Exception: Received from localhost:9000. DB::Exception: Storage Log doesn't support FINAL. (ILLEGAL_FINAL)
(query: select count() from distributed_table;)

Exception looks really misleading to me, I can actually use FINAL with log storage. Exception only appears when analyzer is on.
Seems like FINAL should be ignored when it is not applicable.

I know that FINAL modifier can be used only for a SELECT from ReplacingMergeTree, SummingMergeTree, AggregatingMergeTree, CollapsingMergeTree and VersionedCollapsingMergeTree tables.

@melvynator
Copy link
Member

Given it does not reproduce without the Analyzer:

https://fiddle.clickhouse.com/0264258e-207a-4793-b1d8-41fed7826d7f

I added the analyzer label @KochetovNicolai

@melvynator melvynator added the analyzer Issues and pull-requests related to new analyzer label May 17, 2024
@KochetovNicolai KochetovNicolai self-assigned this May 17, 2024
@KochetovNicolai KochetovNicolai added bug Confirmed user-visible misbehaviour in official release and removed unexpected behaviour labels 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants