Skip to content

Support ALTER TABLE SET (tsdb.chunk_time_interval='1 day') #8005

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

svenklemm
Copy link
Member

No description provided.

Copy link

@fabriziomello, @akuzm: please review this pull request.

Powered by pull-review

@github-actions github-actions bot requested a review from fabriziomello April 24, 2025 11:14
@philkra philkra added this to the v2.20.0 milestone Apr 24, 2025
@@ -292,3 +292,18 @@ SELECT count(*) FROM test_output;
2
(1 row)

-- test ALTER TABLE SET (tsdb.chunk_time_interval) on a hypertable
CREATE TABLE t_with(time timestamptz not null, device text, value float) WITH (tsdb.hypertable,tsdb.time_column='time');
Copy link
Member

Choose a reason for hiding this comment

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

Would be good to also include a test using tsdb.chunk_time_interval in CREATE TABLE

Copy link
Member Author

Choose a reason for hiding this comment

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

This PR only adds ALTER TABLE stuff, for CREATE TABLE there are already multiple tests in tsl/test/sql/create_table_with.sql

@@ -15,7 +15,8 @@

typedef enum AlterTableFlags
{
AlterTableFlagCompressEnabled = 0,
AlterTableFlagChunkTimeInterval = 0,
Copy link
Member

Choose a reason for hiding this comment

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

Why do we have = 0 by the way? Looks as if we cared about the absolute values, but we don't.

Copy link
Member Author

Choose a reason for hiding this comment

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

since those are used as array index we want them to start with 0 to align with array size

Copy link
Member Author

Choose a reason for hiding this comment

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

but those values are never persisted so it's not required that they stay in same order

@svenklemm svenklemm force-pushed the sven/set_chunk_time_interval branch from 23a8c11 to e68b75a Compare April 25, 2025 15:33
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.

4 participants