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

Alter table add column in Iceberg does not support timestamp #19708

Closed
mosabua opened this issue Nov 10, 2023 · 3 comments · Fixed by #22499
Closed

Alter table add column in Iceberg does not support timestamp #19708

mosabua opened this issue Nov 10, 2023 · 3 comments · Fixed by #22499
Assignees

Comments

@mosabua
Copy link
Member

mosabua commented Nov 10, 2023

The following statements works

CREATE TABLE person (
  uuid uuid,
  firstname varchar(50),
  lastname varchar(50),
  dob date,
  create_ts timestamp
);

However adding a column of timestamp type does not work.

ALTER TABLE person
ADD COLUMN update_ts timestamp;

I get the error message.

Timestamp precision (3) not supported for Iceberg. Use "timestamp(6)" instead.

and as expected this works.

ALTER TABLE person
ADD COLUMN update_ts timestamp(6);

However it should really either work for both CREATE and ALTER .. or fail for both. Personally I prefer if it works for both...

@martint
Copy link
Member

martint commented Jun 21, 2024

CREATE and ALTER should work consistently. We've added a mechanism for connectors to "override" the precision of a type. This just seems like a bug or oversight when the feature was added. It needs to be extended to support ADD COLUMN.

@mosabua
Copy link
Member Author

mosabua commented Jun 24, 2024

@alexjo2144 @ebyhr @findinpath - fyi

@mosabua
Copy link
Member Author

mosabua commented Jul 3, 2024

Awesome.. thanks!

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

Successfully merging a pull request may close this issue.

3 participants