-
Notifications
You must be signed in to change notification settings - Fork 890
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add API function for updating OSM chunk ranges
This commit introduces a function `dimension_slice_update_range_for_osm` in the _timescaledb_functions schema. This function is meant to serve as an API call for the OSM extension to update the time range of a hypertable's OSM chunk with the min and max values present in the contiguous time range its tiered chunks span. If the range is not contiguous, then it must be set to the invalid range an OSM chunk is assigned upon creation. A new status field is also introduced in the hypertable catalog table to keep track of whether the ranges covered by tiered and non-tiered chunks overlap. When there is no overlap detected then it is possible to apply the Ordered Append optimization in the presence of OSM chunks.
- Loading branch information
Showing
32 changed files
with
1,230 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Implements: #6036 Add API function for updating OSM chunk ranges |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-- This file and its contents are licensed under the Apache License 2.0. | ||
-- Please see the included NOTICE for copyright information and | ||
-- LICENSE-APACHE for a copy of the license. | ||
|
||
-- This function updates the dimension slice range stored in the catalog with the min and max | ||
-- values that the OSM chunk contains. Since there is only one OSM chunk per hypertable with | ||
-- only a time dimension, the hypertable is used to determine the corresponding slice | ||
CREATE OR REPLACE FUNCTION _timescaledb_functions.hypertable_osm_range_update( | ||
hypertable REGCLASS, | ||
range_start ANYELEMENT = NULL::bigint, | ||
range_end ANYELEMENT = NULL, | ||
empty BOOL = false | ||
) RETURNS BOOL AS '@MODULE_PATHNAME@', | ||
'ts_hypertable_osm_range_update' LANGUAGE C VOLATILE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.