-
Notifications
You must be signed in to change notification settings - Fork 879
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
Assume custom time type range is same as bigint #2544
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2544 +/- ##
==========================================
+ Coverage 90.06% 90.20% +0.13%
==========================================
Files 212 212
Lines 34228 34148 -80
==========================================
- Hits 30829 30802 -27
+ Misses 3399 3346 -53
Continue to review full report at Codecov.
|
6ce70f2
to
e530418
Compare
258ebc8
to
9a46609
Compare
There's an extra commit attached to this PR, which enhances functions for saturating subtraction and addition. Strictly, this could also be a separate PR if people feel strongly about this. |
The database must know the valid time range of a custom time type, similar to how it knows the time ranges of officially supported time types. However, the only way to "know" the valid time range of a custom time type is to assume it is the same as the one of a supported time type. A previous commit tried to make such assumptions by finding an appropriate cast from the custom time type to a supported time type. However, this fails in case there are multiple casts available that each could return a different type and range. This change restricts the choice of valid time ranges to only that of the bigint time type. Fixes timescale#2523
Fix a check for a compatible chunk time interval type when creating a hypertable with a custom time type. Previously, the check allowed `Interval` type intervals for any dimension type that is not an integer type, including custom time types. The check is now changed so that it only accepts an `Interval` for timestamp and date type dimensions. A number of related error messages are also cleaned up so that they are more consistent and conform to the error style guide.
The functions for saturating addition and subtraction of time values assumed positive intervals as input. This change generalizes the code to also handle negative intervals being added or subtracted.
9a46609
to
571b2c1
Compare
This release candidate contains bugfixes since the previous release candidate. **Minor Features** * timescale#2520 Support non-transactional distibuted_exec **Bugfixes** * timescale#2307 Overflow handling for refresh policy with integer time * timescale#2503 Remove error for correct bootstrap of data node * timescale#2507 Fix validation logic when adding a new data node * timescale#2510 Fix outer join qual propagation * timescale#2514 Lock dimension slices when creating new chunk * timescale#2515 Add if_attached argument to detach_data_node() * timescale#2517 Fix member access within misaligned address in chunk_update_colstats * timescale#2525 Fix index creation on hypertables with dropped columns * timescale#2543 Pass correct status to lock_job * timescale#2544 Assume custom time type range is same as bigint * timescale#2563 Fix DecompressChunk path generation * timescale#2564 Improve continuous aggregate datatype handling * timescale#2568 Change use of ssl_dir GUC * timescale#2571 Make errors and messages conform to style guide
This release candidate contains bugfixes since the previous release candidate. **Minor Features** * timescale#2520 Support non-transactional distibuted_exec **Bugfixes** * timescale#2307 Overflow handling for refresh policy with integer time * timescale#2503 Remove error for correct bootstrap of data node * timescale#2507 Fix validation logic when adding a new data node * timescale#2510 Fix outer join qual propagation * timescale#2514 Lock dimension slices when creating new chunk * timescale#2515 Add if_attached argument to detach_data_node() * timescale#2517 Fix member access within misaligned address in chunk_update_colstats * timescale#2525 Fix index creation on hypertables with dropped columns * timescale#2543 Pass correct status to lock_job * timescale#2544 Assume custom time type range is same as bigint * timescale#2563 Fix DecompressChunk path generation * timescale#2564 Improve continuous aggregate datatype handling * timescale#2568 Change use of ssl_dir GUC * timescale#2571 Make errors and messages conform to style guide * timescale#2577 Exclude compressed chunks from ANALYZE/VACUUM
This release candidate contains bugfixes since the previous release candidate. **Minor Features** * timescale#2520 Support non-transactional distibuted_exec **Bugfixes** * timescale#2307 Overflow handling for refresh policy with integer time * timescale#2503 Remove error for correct bootstrap of data node * timescale#2507 Fix validation logic when adding a new data node * timescale#2510 Fix outer join qual propagation * timescale#2514 Lock dimension slices when creating new chunk * timescale#2515 Add if_attached argument to detach_data_node() * timescale#2517 Fix member access within misaligned address in chunk_update_colstats * timescale#2525 Fix index creation on hypertables with dropped columns * timescale#2543 Pass correct status to lock_job * timescale#2544 Assume custom time type range is same as bigint * timescale#2563 Fix DecompressChunk path generation * timescale#2564 Improve continuous aggregate datatype handling * timescale#2568 Change use of ssl_dir GUC * timescale#2571 Make errors and messages conform to style guide * timescale#2577 Exclude compressed chunks from ANALYZE/VACUUM
This release candidate contains bugfixes since the previous release candidate. **Minor Features** * #2520 Support non-transactional distibuted_exec **Bugfixes** * #2307 Overflow handling for refresh policy with integer time * #2503 Remove error for correct bootstrap of data node * #2507 Fix validation logic when adding a new data node * #2510 Fix outer join qual propagation * #2514 Lock dimension slices when creating new chunk * #2515 Add if_attached argument to detach_data_node() * #2517 Fix member access within misaligned address in chunk_update_colstats * #2525 Fix index creation on hypertables with dropped columns * #2543 Pass correct status to lock_job * #2544 Assume custom time type range is same as bigint * #2563 Fix DecompressChunk path generation * #2564 Improve continuous aggregate datatype handling * #2568 Change use of ssl_dir GUC * #2571 Make errors and messages conform to style guide * #2577 Exclude compressed chunks from ANALYZE/VACUUM
This release candidate contains bugfixes since the previous release candidate. **Minor Features** * #2520 Support non-transactional distibuted_exec **Bugfixes** * #2307 Overflow handling for refresh policy with integer time * #2503 Remove error for correct bootstrap of data node * #2507 Fix validation logic when adding a new data node * #2510 Fix outer join qual propagation * #2514 Lock dimension slices when creating new chunk * #2515 Add if_attached argument to detach_data_node() * #2517 Fix member access within misaligned address in chunk_update_colstats * #2525 Fix index creation on hypertables with dropped columns * #2543 Pass correct status to lock_job * #2544 Assume custom time type range is same as bigint * #2563 Fix DecompressChunk path generation * #2564 Improve continuous aggregate datatype handling * #2568 Change use of ssl_dir GUC * #2571 Make errors and messages conform to style guide * #2577 Exclude compressed chunks from ANALYZE/VACUUM
This release candidate contains bugfixes since the previous release candidate. **Minor Features** * #2520 Support non-transactional distibuted_exec **Bugfixes** * #2307 Overflow handling for refresh policy with integer time * #2503 Remove error for correct bootstrap of data node * #2507 Fix validation logic when adding a new data node * #2510 Fix outer join qual propagation * #2514 Lock dimension slices when creating new chunk * #2515 Add if_attached argument to detach_data_node() * #2517 Fix member access within misaligned address in chunk_update_colstats * #2525 Fix index creation on hypertables with dropped columns * #2543 Pass correct status to lock_job * #2544 Assume custom time type range is same as bigint * #2563 Fix DecompressChunk path generation * #2564 Improve continuous aggregate datatype handling * #2568 Change use of ssl_dir GUC * #2571 Make errors and messages conform to style guide * #2577 Exclude compressed chunks from ANALYZE/VACUUM
The database must know the valid time range of a custom time type,
similar to how it knows the time ranges of officially supported time
types. However, the only way to "know" the valid time range of a
custom time type is to assume it is the same as the one of a supported
time type.
A previous commit tried to make such assumptions by finding an
appropriate cast from the custom time type to a supported time
type. However, this fails in case there are multiple casts available
that each could return a different type and range.
This change restricts the choice of valid time ranges to only that of
the bigint time type.
Fixes #2523