-
Notifications
You must be signed in to change notification settings - Fork 938
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
base: main
Are you sure you want to change the base?
Conversation
@fabriziomello, @akuzm: please review this pull request.
|
@@ -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'); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
23a8c11
to
e68b75a
Compare
No description provided.