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

INSERT exception after MODIFY COLUMN with default and codec #8593

Closed
alex-zaitsev opened this issue Jan 9, 2020 · 1 comment · Fixed by #8614
Closed

INSERT exception after MODIFY COLUMN with default and codec #8593

alex-zaitsev opened this issue Jan 9, 2020 · 1 comment · Fixed by #8614
Labels
bug Confirmed user-visible misbehaviour in official release

Comments

@alex-zaitsev
Copy link
Contributor

How to reproduce


drop table if exists test.t64_bug;

CREATE TABLE test.t64_bug (
epoch UInt64,
_time_dec Float64
) Engine = MergeTree
ORDER BY (epoch)
;

alter table test.t64_bug modify column epoch DEFAULT CAST(floor(_time_dec), 'UInt64') * 1000000000 CODEC(T64,LZ4);

insert into test.t64_bug(_time_dec) values(1577351080);

Received exception from server (version 19.18.1):
Code: 270. DB::Exception: Received from localhost:9000, ::1. DB::Exception: Connot compress with T64. 

P.S. Also note that error message has a spelling error: 'connot'

@alex-zaitsev alex-zaitsev added the bug Confirmed user-visible misbehaviour in official release label Jan 9, 2020
@4ertus2
Copy link
Contributor

4ertus2 commented Jan 10, 2020

There's also silent error with Delta codec:

create table test.t64_bug (
    epoch UInt64 CODEC(Delta,LZ4),
    _time_dec Float64
) Engine = MergeTree ORDER BY (epoch);

desc table test.t64_bug;
alter table test.t64_bug modify column epoch DEFAULT toUInt64(_time_dec) CODEC(Delta,LZ4);
desc table test.t64_bug;
epoch   UInt64                          Delta(8), LZ4
_time_dec       Float64
epoch   UInt64  DEFAULT toUInt64(_time_dec)             Delta(1), LZ4
_time_dec       Float64

Method useInfoAboutType() should be called with correct type for new column (after alter modify).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed user-visible misbehaviour in official release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants