Skip to content

Antalya 26:6 Fix alter operations for iceberg - #2157

Open
subkanthi wants to merge 10 commits into
antalya-26.6from
antalya_26_6_fix_alter_table_iceberg
Open

Antalya 26:6 Fix alter operations for iceberg#2157
subkanthi wants to merge 10 commits into
antalya-26.6from
antalya_26_6_fix_alter_table_iceberg

Conversation

@subkanthi

@subkanthi subkanthi commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

continuation of work from #1841

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

...

Documentation entry for user-facing changes

...

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Performance tests
  • Aarch64 tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • OAuth (5m)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Workflow [PR], commit [a4e6f39]

@subkanthi subkanthi changed the title Fix alter operations for iceberg Antalya 26:6 Fix alter operations for iceberg Aug 6, 2026
@subkanthi
subkanthi marked this pull request as ready for review August 6, 2026 04:26
@subkanthi subkanthi closed this Aug 6, 2026
@subkanthi subkanthi reopened this Aug 6, 2026
@subkanthi subkanthi closed this Aug 6, 2026
@subkanthi subkanthi reopened this Aug 6, 2026
@subkanthi subkanthi closed this Aug 6, 2026
@subkanthi subkanthi reopened this Aug 6, 2026
@subkanthi

subkanthi commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

ADD COLUMN

Ubuntu-2404-noble-amd64-base :) ALTER table ice.`default.dest5` add column new_column Nullable(UInt64);

ALTER TABLE ice.`default.dest5`
    (ADD COLUMN `new_column` Nullable(UInt64))

Query id: 825e8155-ec00-45f0-a54e-63291f46ef10

Ok.

0 rows in set. Elapsed: 0.314 sec. 

Ubuntu-2404-noble-amd64-base :) show create table ice.`default.dest5`;

SHOW CREATE TABLE ice.`default.dest5`

Query id: 0c79176a-55dd-4aa4-a4c4-2125f5cde5fe

   ┌─statement────────────────────────────────────────────────┐
1. │ CREATE TABLE ice.`default.dest5`                        ↴│
   │↳(                                                       ↴│
   │↳    `event_month` Int32,                                ↴│
   │↳    `id` Int64,                                         ↴│
   │↳    `event_time` DateTime64(6),                         ↴│
   │↳    `user_id` Int32,                                    ↴│
   │↳    `category_name` String,                             ↴│
   │↳    `value` Float64,                                    ↴│
   │↳    `payload` String,                                   ↴│
   │↳    `col2` Nullable(Int64),                             ↴│
   │↳    `new_column` Nullable(Int64)                        ↴│
   │↳)                                                       ↴│
   │↳ENGINE = Iceberg('http://localhost:9000/bucket1/dest6/') │
   └──────────────────────────────────────────────────────────┘

DROP COLUMN

 alter table ice.`default.dest5` drop column col2;

ALTER TABLE ice.`default.dest5`
    (DROP COLUMN col2)

Query id: a7905249-670b-4ac2-a626-f95535c02730

Connecting to database ice at localhost:9007 as user default.
Connected to ClickHouse server version 26.6.2.

Ok.

0 rows in set. Elapsed: 0.122 sec. 

Ubuntu-2404-noble-amd64-base :) show create table ice.`default.dest5`;

SHOW CREATE TABLE ice.`default.dest5`

Query id: 9d3b156a-ca6d-4997-917a-8bf36d4d7058

   ┌─statement────────────────────────────────────────────────┐
1. │ CREATE TABLE ice.`default.dest5`                        ↴│
   │↳(                                                       ↴│
   │↳    `event_month` Int32,                                ↴│
   │↳    `id` Int64,                                         ↴│
   │↳    `event_time` DateTime64(6),                         ↴│
   │↳    `user_id` Int32,                                    ↴│
   │↳    `category_name` String,                             ↴│
   │↳    `value` Float64,                                    ↴│
   │↳    `payload` String,                                   ↴│
   │↳    `new_column` Nullable(Int64)                        ↴│
   │↳)                                                       ↴│
   │↳ENGINE = Iceberg('http://localhost:9000/bucket1/dest6/') │
   └──────────────────────────────────────────────────────────┘

1 row in set. Elapsed: 0.016 sec. 

RENAME COLUMN

 alter table ice.`default.dest5` rename column new_column to new_column_2;

ALTER TABLE ice.`default.dest5`
    (RENAME COLUMN new_column TO new_column_2)

Query id: e464f77e-0e3d-4ffc-883e-70db1260327f

Ok.

0 rows in set. Elapsed: 0.169 sec. 

Ubuntu-2404-noble-amd64-base :) show create table ice.`default.dest5`;

SHOW CREATE TABLE ice.`default.dest5`

Query id: 0b4b4e06-7d58-4583-821a-95e27f856ba9

   ┌─statement────────────────────────────────────────────────┐
1. │ CREATE TABLE ice.`default.dest5`                        ↴│
   │↳(                                                       ↴│
   │↳    `event_month` Int32,                                ↴│
   │↳    `id` Int64,                                         ↴│
   │↳    `event_time` DateTime64(6),                         ↴│
   │↳    `user_id` Int32,                                    ↴│
   │↳    `category_name` String,                             ↴│
   │↳    `value` Float64,                                    ↴│
   │↳    `payload` String,                                   ↴│
   │↳    `new_column_2` Nullable(Int64)                      ↴│
   │↳)                                                       ↴│
   │↳ENGINE = Iceberg('http://localhost:9000/bucket1/dest6/') │
   └──────────────────────────────────────────────────────────┘

1 row in set. Elapsed: 0.017 sec. 


@subkanthi subkanthi closed this Aug 6, 2026
@subkanthi subkanthi reopened this Aug 6, 2026
{
switch (type->getTypeId())
{
case TypeIndex::UInt8:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added support for bool

return {"string", true};
case TypeIndex::UUID:
return {"uuid", true};
case TypeIndex::Decimal32:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added support for iceberg decimal types.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant